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 16 build error #2278

Closed
2 tasks done
simonpham opened this issue Sep 17, 2024 · 37 comments
Closed
2 tasks done

Xcode 16 build error #2278

simonpham opened this issue Sep 17, 2024 · 37 comments
Labels
bug Something isn't working

Comments

@simonpham
Copy link

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

Environment

Technology Version
Flutter version 3.24.2
Plugin version 6.0.0
iOS version 18.0 (22A3354)
macOS version 15.0 (24A335)
Xcode version 16.0 (16A242d)

Device information:

Description

Expected behavior:

Current behavior:

Steps to reproduce

  1. Use Xcode 16.0
  2. Build the app for iOS.

Images

Stacktrace/Logcat

Failed to build iOS app
Could not build the precompiled application for the device.
Swift Compiler Error (Xcode): Method does not override any method from its superclass
/Users/simon/.pub-cache/hosted/pub.dev/flutter_inappwebview_ios-1.0.13/ios/Classes/InAppWebView/InAppWebView.swift:1431:25

Swift Compiler Error (Xcode): Ambiguous use of 'evaluateJavaScript(_:completionHandler:)'
/Users/simon/.pub-cache/hosted/pub.dev/flutter_inappwebview_ios-1.0.13/ios/Classes/InAppWebView/InAppWebView.swift:2859:22

Swift Compiler Error (Xcode): Ambiguous use of 'evaluateJavaScript(_:completionHandler:)'
/Users/simon/.pub-cache/hosted/pub.dev/flutter_inappwebview_ios-1.0.13/ios/Classes/InAppWebView/InAppWebView.swift:2870:22
@simonpham simonpham added the bug Something isn't working label Sep 17, 2024
Copy link

👋 @simonpham

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!

@2paperstar
Copy link

maybe duplicated with #2201

you can check #2201 (comment)

@simonpham
Copy link
Author

maybe duplicated with #2201

you can check #2201 (comment)

I have checked and found it's just a workaround by deleting all the code that cause the issues.

The code need to be migrated, not deleted.

@2paperstar
Copy link

maybe duplicated with #2201
you can check #2201 (comment)

I have checked and found it's just a workaround by deleting all the code that cause the issues.

The code need to be migrated, not deleted.

In that comment, you can just change the completionHandler parameter type

@ZoftPranav
Copy link

This needs to be handled in high priority

@simonpham
Copy link
Author

maybe duplicated with #2201
you can check #2201 (comment)

I have checked and found it's just a workaround by deleting all the code that cause the issues.
The code need to be migrated, not deleted.

In that comment, you can just change the completionHandler parameter type

I found a PR that applied that suggestion. @pichillilorenzo please take a look
https://github.com/pichillilorenzo/flutter_inappwebview/pull/2274/files

@redDwarf03
Copy link

when you understand that this lib is no longer maintained.... we've been waiting for patches for the latest versions of android for months... so with ios18.... good luck....

@rmcotrim
Copy link

I'm not calling explicitly this package, so what should I delete to be able to build my app ? Could not find what other packages depend on flutter_inappwebview_ios.

@Sebastian0002
Copy link

I'm not calling explicitly this package, so what should I delete to be able to build my app ? Could not find what other packages depend on flutter_inappwebview_ios.

You can run 'flutter pub deps' to see which package uses flutter_inappwebview_ios.

@Gabriel-Eduardo-Cunha
Copy link

@Sebastian0002 Thanks for the tip.
In my case, I had the package pluggy_connect 2.0.0 that depends on flutter_inappwebview_ios.
Just removing this depency fixed the issue. I can temporarily live without it, but a fix in this flutter_inappwebview_ios would be very welcome.

@LeoAiolia
Copy link

LeoAiolia commented Sep 18, 2024

image
The problem with this method can be solved by changing the function name. Hope it can be fixed as soon as possible.

@ZhangMengLei
Copy link

1

@ke112
Copy link

ke112 commented Sep 18, 2024

I put this modified method, written a simple script, you can try to solve this problem https://github.com/ke112/fixios18

@pconradjunior
Copy link

Stuck with the same problem here, thinking about a fork...

paganellif pushed a commit to paganellif/flutter_inappwebview that referenced this issue Sep 18, 2024
@trueAtom
Copy link

@pichillilorenzo need help

@kekland
Copy link

kekland commented Sep 18, 2024

In the meantime you can follow #2274 and add dependency overrides to the pubspec

@nabiarshad
Copy link

same issue after updating to Mac OS sequoia.
Xcode Version 16.0 (16A242d)

@trueAtom
Copy link

In the meantime you can follow #2274 and add dependency overrides to the pubspec

After adding dependency overrides, the build runs fine, but the application freezes when trying to use the package.

Downgrading Xcode to 15.4 solved all the issues

@kekland
Copy link

kekland commented Sep 18, 2024

@trueAtom could you provide a stack trace of the crashed thread?

We had issues with a seemingly random crash, but from a different package. Wondering if it's related. It was due to libRPAC and the newly added Thread Performance Checker

@trueAtom
Copy link

@trueAtom could you provide a stack trace of the crashed thread?

We had issues with a seemingly random crash, but from a different package. Wondering if it's related. It was due to libRPAC and the newly added Thread Performance Checker

Sorry, I don't have the opportunity right now, I already found the problem in the testflight build and then downgraded xcode to save time

@Vrungel322
Copy link

@trueAtom could you provide a stack trace of the crashed thread?
We had issues with a seemingly random crash, but from a different package. Wondering if it's related. It was due to libRPAC and the newly added Thread Performance Checker

Sorry, I don't have the opportunity right now, I already found the problem in the testflight build and then downgraded xcode to save time

How you made downgrade of xcode? my macOs do not want to interact with xcode 15.4

@trueAtom
Copy link

@trueAtom could you provide a stack trace of the crashed thread?
We had issues with a seemingly random crash, but from a different package. Wondering if it's related. It was due to libRPAC and the newly added Thread Performance Checker

Sorry, I don't have the opportunity right now, I already found the problem in the testflight build and then downgraded xcode to save time

How you made downgrade of xcode? my macOs do not want to interact with xcode 15.4

I haven't updated my Mac OS, I have Sonoma 14.7.

@minhcasi
Copy link

@simonpham chừng nào họ release bản mới notify anh hen 🎉

@ZoftPranav
Copy link

can somebody give me a proper way to fix this issue , is to have an app in production and macOS is updated so downgrading is not an option.

AndreTsao added a commit to AndreTsao/flutter_inappwebview that referenced this issue Sep 19, 2024
@adamk22
Copy link

adamk22 commented Sep 19, 2024

Ran into this issue as well after updating mac/xcode etc. This is a quickfix that helped me fix the issue for now: #2279 (comment)

@pconradjunior
Copy link

I already did some quickfixes as mentioned before but in Android the plugin freezes or is slow on loading pages. Stucks around 80% of the page loaded. Any help?

@simonpham
Copy link
Author

simonpham commented Sep 20, 2024

You can resolve the issue by opening Runner.xcworkspace > Runner > Edit Scheme -> Build -> Pre-actions -> + -> New Run Script Action -> Paste the content of this file: https://github.com/simonpham/fixios18/blob/main/fixios18_prebuild_script.sh

image

@minhcasi anh xài thử

Thank to @ke112 for the script.

@ke112
Copy link

ke112 commented Sep 22, 2024 via email

@pichillilorenzo
Copy link
Owner

Released new version 6.1.0 with the fix, thanks.

@andynewman10
Copy link

andynewman10 commented Sep 24, 2024

I am getting the same error with Xcode 15.2 on macOS Ventura, using the latest flutter_inappwebview 6.1.0+1 (flutter_inappwebview_ios 1.1.0). Any idea why?

The error is at the exact same place, InAppWebView.swift:1431:25.

@eldarkk
Copy link

eldarkk commented Sep 25, 2024

I am getting the same error with Xcode 15.2 on macOS Ventura, using the latest flutter_inappwebview 6.1.0+1 (flutter_inappwebview_ios 1.1.0). Any idea why?

The error is at the exact same place, InAppWebView.swift:1431:25.

im not 100% sure, but try with XCode 16

https://xcodereleases.com/

@pichillilorenzo
Copy link
Owner

Check #2288

@eldarkk
Copy link

eldarkk commented Sep 25, 2024

seems like its still not working

@andynewman10
Copy link

The fix from Lorenzo in #2288 is working for me using Xcode 15.2, using iPhoneOS.platform SDK 17.2.

@ARULNITHI0414
Copy link

ARULNITHI0414 commented Sep 26, 2024

"I've updated my Flutter version (3.24.0) and the flutter_inappwebview package to 6.1.0, and the issue is now resolved."

@felipecastrosales
Copy link

Hello everyone! I opened an issue #2327 related to a new problem like this. I ask that you consider upvoting or interacting so that the maintainers can see this as soon as possible. Remember that these problems can happen to you - as is happening to me. :)

Copy link

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 22, 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