Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XCODE 15 update: Parse Issue (Xcode): Could not build module 'WebKit' #1807

Closed
2 tasks done
alnaughty opened this issue Sep 27, 2023 · 15 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@alnaughty
Copy link

alnaughty commented Sep 27, 2023

  • I have read the Getting Started section
  • I have already searched for the same problem

Environment

Technology Version
Flutter version
Plugin version
Android version
iOS version
macOS version
Xcode version

Device information:

Description

Expected behavior: Able to build ios apps with no problem/issue

Current behavior: since updating to xcode 15 it crashes and throws Parse Issue (Xcode): Could not build module 'WebKit'

Steps to reproduce

Images

Stacktrace/Logcat

@alnaughty alnaughty added the bug Something isn't working label Sep 27, 2023
@github-actions
Copy link

👋 @alnaughty

NOTE: This comment is auto-generated.

Are you sure you have already searched for the same problem?

Some people open new issues but they didn't search for something similar or for the same issue. Please, search for it using the GitHub issue search box or on the official inappwebview.dev website, or, also, using Google, StackOverflow, etc. before posting a new one. You may already find an answer to your problem!

If this is really a new issue, then thank you for raising it. I will investigate it and get back to you as soon as possible. Please, make sure you have given me as much context as possible! Also, if you didn't already, post a code example that can replicate this issue.

In the meantime, you can already search for some possible solutions online! Because this plugin uses native WebView, you can search online for the same issue adding android WebView [MY ERROR HERE] or ios WKWebView [MY ERROR HERE] keywords.

Following these steps can save you, me, and other people a lot of time, thanks!

@Rishab-ms
Copy link

I have the same issue...

@MansoorImtiaz
Copy link

I have the same issue

@tanmoy27112000
Copy link

add this code to the end of the pod file

post_integrate do |installer|
  compiler_flags_key = 'COMPILER_FLAGS'
  project_path = 'Pods/Pods.xcodeproj'

  project = Xcodeproj::Project.open(project_path)
  project.targets.each do |target|
    target.build_phases.each do |build_phase|
      if build_phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase)
        build_phase.files.each do |file|
          if !file.settings.nil? && file.settings.key?(compiler_flags_key)
            compiler_flags = file.settings[compiler_flags_key]
            file.settings[compiler_flags_key] = compiler_flags.gsub(/-DOS_OBJECT_USE_OBJC=0\s*/, '')
          end
        end
      end
    end
  end
  project.save()
end

this solved my issue

@dibyanshu-mohanty
Copy link

add this code to the end of the pod file

post_integrate do |installer|
  compiler_flags_key = 'COMPILER_FLAGS'
  project_path = 'Pods/Pods.xcodeproj'

  project = Xcodeproj::Project.open(project_path)
  project.targets.each do |target|
    target.build_phases.each do |build_phase|
      if build_phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase)
        build_phase.files.each do |file|
          if !file.settings.nil? && file.settings.key?(compiler_flags_key)
            compiler_flags = file.settings[compiler_flags_key]
            file.settings[compiler_flags_key] = compiler_flags.gsub(/-DOS_OBJECT_USE_OBJC=0\s*/, '')
          end
        end
      end
    end
  end
  project.save()
end

this solved my issue

Thanks a lot man. It worked for me as well

@mrhaubrich
Copy link

add this code to the end of the pod file

post_integrate do |installer|
  compiler_flags_key = 'COMPILER_FLAGS'
  project_path = 'Pods/Pods.xcodeproj'

  project = Xcodeproj::Project.open(project_path)
  project.targets.each do |target|
    target.build_phases.each do |build_phase|
      if build_phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase)
        build_phase.files.each do |file|
          if !file.settings.nil? && file.settings.key?(compiler_flags_key)
            compiler_flags = file.settings[compiler_flags_key]
            file.settings[compiler_flags_key] = compiler_flags.gsub(/-DOS_OBJECT_USE_OBJC=0\s*/, '')
          end
        end
      end
    end
  end
  project.save()
end

this solved my issue

Thanks, also worked for me!

@egor-slatvinskiy-idf
Copy link

Please share a fix if the project has build configurations or multiple targets

@pichillilorenzo
Copy link
Owner

Released new version 5.8.0 and 6.0.0-beta.25 with the fix!

@Dicksenz
Copy link

Dicksenz commented Oct 3, 2023

Is there a fix for older version of Flutter SDK ?

@iuzairaslam
Copy link

iuzairaslam commented Oct 4, 2023

This solved the issue:

post_integrate do |installer|
compiler_flags_key = 'COMPILER_FLAGS'
project_path = 'Pods/Pods.xcodeproj'

project = Xcodeproj::Project.open(project_path)
project.targets.each do |target|
target.build_phases.each do |build_phase|
if build_phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase)
build_phase.files.each do |file|
if !file.settings.nil? && file.settings.key?(compiler_flags_key)
compiler_flags = file.settings[compiler_flags_key]
file.settings[compiler_flags_key] = compiler_flags.gsub(/-DOS_OBJECT_USE_OBJC=0\s*/, '')
end
end
end
end
end
project.save()
end

@mehsarioglu
Copy link

add this code to the end of the pod file

post_integrate do |installer|
  compiler_flags_key = 'COMPILER_FLAGS'
  project_path = 'Pods/Pods.xcodeproj'

  project = Xcodeproj::Project.open(project_path)
  project.targets.each do |target|
    target.build_phases.each do |build_phase|
      if build_phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase)
        build_phase.files.each do |file|
          if !file.settings.nil? && file.settings.key?(compiler_flags_key)
            compiler_flags = file.settings[compiler_flags_key]
            file.settings[compiler_flags_key] = compiler_flags.gsub(/-DOS_OBJECT_USE_OBJC=0\s*/, '')
          end
        end
      end
    end
  end
  project.save()
end

this solved my issue

Thanks, it works!

@yimao009
Copy link

Is there a fix for older version of Flutter SDK ?

Released new version 5.8.0 and 6.0.0-beta.25 with the fix!

@MuhammetAkgoz
Copy link

Released new version 5.8.0 and 6.0.0-beta.25 with the fix!

Thanks for helping. I love you, man who I don't know

@dchristo978
Copy link

Is there a fix for older version of Flutter SDK ?

Facing the same issue. using flutter 2.10.5 and xcode 15.x. Any solution?

Copy link

github-actions bot commented Oct 4, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests