pichillilorenzo / flutter_inappwebview

A Flutter plugin that allows you to add an inline webview, to use a headless webview, and to open an in-app browser window.
https://inappwebview.dev
Apache License 2.0
3.18k stars 1.55k forks source link

Xcode 16 build error #2278

Open simonpham opened 4 days ago

simonpham commented 4 days ago

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
github-actions[bot] commented 4 days ago

👋 @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 commented 3 days ago

maybe duplicated with #2201

you can check https://github.com/pichillilorenzo/flutter_inappwebview/issues/2201#issuecomment-2221646944

simonpham commented 3 days ago

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 commented 3 days ago

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 commented 3 days ago

This needs to be handled in high priority

simonpham commented 3 days ago

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 commented 3 days ago

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 commented 3 days ago

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 commented 3 days ago

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 commented 3 days ago

@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 commented 2 days ago

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

ZhangMengLei commented 2 days ago

1

ke112 commented 2 days ago

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

pconradjunior commented 2 days ago

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

trueAtom commented 2 days ago

@pichillilorenzo need help

kekland commented 2 days ago

In the meantime you can follow https://github.com/pichillilorenzo/flutter_inappwebview/pull/2274 and add dependency overrides to the pubspec

nabiarshad commented 2 days ago

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

trueAtom commented 2 days ago

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 commented 2 days ago

@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 commented 2 days ago

@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 commented 2 days ago

@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 commented 2 days ago

@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 commented 2 days ago

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

ZoftPranav commented 2 days ago

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.

adamk22 commented 2 days ago

Ran into this issue as well after updating mac/xcode etc. This is a quickfix that helped me fix the issue for now: https://github.com/pichillilorenzo/flutter_inappwebview/issues/2279#issuecomment-2357799393

pconradjunior commented 1 day ago

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 commented 16 hours ago

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.