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

[CRITICAL] XCode 16.1 fails to build #2327

Open
1 of 2 tasks
felipecastrosales opened this issue Oct 7, 2024 · 29 comments
Open
1 of 2 tasks

[CRITICAL] XCode 16.1 fails to build #2327

felipecastrosales opened this issue Oct 7, 2024 · 29 comments
Labels
bug Something isn't working

Comments

@felipecastrosales
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Current behaviour is that appears problems like:

Overriding 'init' must be as available as declaration it overrides

image

And others like:

image

I was trying solve this errors and when I fixed and put to build the error was increased to 50 exceptions:

image

I would like @pichillilorenzo and other developers who maintain this plugin to fix this, because it seems like a bigger deal to fix and there may be an easier way than what I was trying.

Thanks!

Expected Behavior

That works as expected and build for using Xcode16.1. :)

Steps with code example to reproduce

Only build an Flutter app.

Stacktrace/Logs

Overriding 'init' must be as available as declaration it overrides


Protocol 'WKUIDelegate' requires 'webView(_:willPresentEditMenuWithAnimator:)' to be available in iOS 16.0 and newer


Protocol 'WKUIDelegate' requires 'webView(_:requestMediaCapturePermissionFor:initiatedByFrame:type:decisionHandler:)' to be available in iOS 12.0 and newer


Protocol 'WKUIDelegate' requires 'webView(_:requestDeviceOrientationAndMotionPermissionFor:initiatedByFrame:decisionHandler:)' to be available in iOS 12.0 and newer


etc.

Flutter version

v3.24.0

Operating System, Device-specific and/or Tool

iOS specifically

Plugin version

v6.1.4

Additional information

I've seen issues from others related to XCode 16, but Xcode 16.1 has other bugs that are very different from the previous ones.

Self grab

  • I'm ready to work on this issue!
@felipecastrosales
Copy link
Author

felipecastrosales commented Oct 8, 2024

Please change the deployment target ios version 14

I saw your suggestion a few hours ago and was going to test it as soon as I started work, but thinking about it now, I don't think that's a good idea because I'll lose access to other versions that my application supports.

@felipecastrosales
Copy link
Author

Ok, I can try this but I think that this is not the best way to follow. @pichillilorenzo can you suggest anything?

@Imgkl
Copy link

Imgkl commented Oct 8, 2024

@ARULNITHI0414 Didn't work.

@felipecastrosales
Copy link
Author

@ARULNITHI0414 I tried with version 14 and 15 and doesn't work as expected. It's the same error.

image

@felipecastrosales
Copy link
Author

I want to add, I don't think bump to version 14.0 is the best option. The maintainers must have a better solution.

@felipecastrosales felipecastrosales changed the title XCode 16.1 fails to build [CRITICAL] XCode 16.1 fails to build Oct 9, 2024
@aorohith
Copy link

aorohith commented Oct 10, 2024

I have forked and changed in ios, Now the build issue is solved and working fine.
MAKE SURE ADDED THE SAME IN DEPENDENCY OVERRIDE SECTION
Please use the below as a dependency for now
flutter_inappwebview:
git:
url: https://github.com/aorohith/flutter_inappwebview.git
path: flutter_inappwebview
ref: master
created a pull request #2336

@felipecastrosales
Copy link
Author

@aorohith I saw your proposal, but I don't think it's correct - at least not completely. I haven't tested it yet, but I gave it a review.

@lstonussi
Copy link

I'm facing a similar issue after updating to Xcode 16. Any solutions?

@Marko1994
Copy link

@aorohith your solution works as expected, Thank you so much

@felipecastrosales
Copy link
Author

@aorohith I tried using your implementation and kept with problems for me. And I make flutter clean and "pod cleans" relateds.

image

@felipecastrosales
Copy link
Author

Also, when I use last version of this plugin I receive this error:

image

When I bumped to 14 as latest version for IPHONEOS_DEPLOYMENT_TARGET and on platform :ios, '14.0', generate these errors:

image

I really appreciate that this issue has been resolved, because this will happen to more people in the future.

@Marko1994
Copy link

@felipecastrosales have you tried deleting all pods and podfile.lock ?
And than "pod install" or "pod update"

@felipecastrosales
Copy link
Author

@Marko1994 yes, all commands. like: rm -rf Podfile.lock && pod repo update && pod update && pod install --verbose, pod repo remove trunk, pod deintegrate etc.

@Marko1994
Copy link

@felipecastrosales Strange

@Marko1994
Copy link

Marko1994 commented Oct 11, 2024

@felipecastrosales
Let me tell you what I have followed

Step 1: add forked repo in pubspec instead of the version one, Like this

flutter_inappwebview:
git: url: https://github.com/aorohith/flutter_inappwebview.git
path: flutter_inappwebview
ref: master

Step 2: add flutter_inappwebview 6.x whatever you used in dependency_override, like this

dependency_overrides:
flutter_inappwebview: ^6.0.0

Step 3: clean pod and pod update

and it works

@felipecastrosales
Copy link
Author

@Marko1994, still isn't working as expected. Could you share your pubspec.yaml file here as an example of how you implemented it?

@aorohith
Copy link

@felipecastrosales Use the same forked package as the dependency override instead of pub package

git: url: https://github.com/aorohith/flutter_inappwebview.git
path: flutter_inappwebview
ref: master

@felipecastrosales
Copy link
Author

@aorohith using your recommendation I have this problems:

image

@felipecastrosales
Copy link
Author

After that I bump my minimum iOS version to 14.0 and IPHONEOS_DEPLOYMENT_TARGET to 14.

image

@felipecastrosales
Copy link
Author

I tried more onetime using a new version of XCode (beta 3) + iPhone 16 Pro Max simulator and I receive this now:

image

@felipecastrosales
Copy link
Author

Now with iPhone 16 Pro Max (18.0) using XCode 16.0.

image

I'm currently using macos 15.0.1.

@felipecastrosales
Copy link
Author

All of tests are on your fork @aorohith and using as override. cc @Marko1994

@aorohith
Copy link

aorohith commented Oct 14, 2024

@felipecastrosales
Let me share my settings

  1. Mac OS version : 15.0.1 (24A348)
  2. Xcode : Version 16.0 (16A242d)
  3. Fluter. : 2.24.0
  4. Dart : 3.5.0
  5. Using the forked flutter_inappwebview in both dependency and dependency_overrides section
  6. In pod file and minimum iOS version to 13.0
    Also in pod file added this code
Screenshot 2024-10-14 at 10 42 06 PM

Still, I am not sure about the issue you are facing. Add the line below to the pod file like above and try.
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'

@felipecastrosales
Copy link
Author

@aorohith i'm trying now with:

  • installer.generated_projects.each do |project| instead of installer.pods_project.targets.each do |target|;
  • adding forked flutter_inappwebview in both places;
  • setting to 13 specifically (I tried with 14 and 15).

@felipecastrosales
Copy link
Author

@aorohith I've been testing your alternative and variations but I've had several problems. several indeed. If I use Flutter 3.24.0, xcode 16.0 with mac 15.0.1, with the fork in both and doing this configuration I have errors like:

image

image

I tested several simulators and on 2 different physical devices, the result was always errors of this type.

I really keep thinking there's something that needs to be tweaked in this plugin and I'd like @pichillilorenzo to look into it.

@pichillilorenzo
Copy link
Owner

pichillilorenzo commented Oct 14, 2024

Sorry guys, I will take a look into it as soon as possible.
In the meantime, could you just use XCode 16.0 instead of XCode 16.1? You can have multiple XCode versions installed on your machine. Rename it with a different name.
You can download it from https://developer.apple.com/download/all/?name=Xcode

@felipecastrosales
Copy link
Author

felipecastrosales commented Oct 14, 2024

@pichillilorenzo thanks for answer.
I tried with different versions of XCode. After each test and installation I always delete the old one and restart the machine, to make sure it would restart. I was unable to use version 16.0 with Mac 15.0.1 and had the above problems.

@felipecastrosales
Copy link
Author

Any news?

@hieutran1999
Copy link

same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants