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.3k stars 1.63k forks source link

Not working on new IOS updated #2283

Closed ghost closed 1 month ago

ghost commented 2 months ago

Environment

Technology Version
Flutter version 3.24.3
Plugin version 6.0.0
Android version
iOS version 18.0
macOS version
Xcode version
Google Chrome version

Device information:

Description

Expected behavior:

Current behavior:

Steps to reproduce

  1. This
  2. Than that
  3. Then

Images

Stacktrace/Logcat

Swift Compiler Error (Xcode): Method does not override any method from its superclass /Users/technoexponent/.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/technoexponent/.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/technoexponent/.pub-cache/hosted/pub.dev/flutter_inappwebview_ios-1.0.13/ios/Classes/InAppWebView/InAppWebView.swift:2870:22

github-actions[bot] commented 2 months ago

👋 @m1narulal1

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!

MrLightful commented 2 months ago

Yep, same.

arrrrny commented 2 months ago

You can use my new package zikzak_inappwebview fork of this package that I will keep maintaining. Thanks @pichillilorenzo for developing/maintaining this package for a long time. I guess he is busy or on vacataion. I am the builder of Flutter Vendure (open source headless commerce framework) package. Vendure Please open your PRs here and I am happy to check them and merge them by Monday.

nemscep commented 1 month ago

This is an issue with xcode 16. What worked for me was to install previous version of xcode 15.4 using xcodes and then changing command line tools version in xcode locations settings to 15.4 instead of 16 and voila, everything is back to working again 😄

HarshuPatel007 commented 1 month ago

Hello, folks I found a temporary solution for the issue in Xcode. In the InAppWebView class under the iOS folder, you need to replace the following code in the Java file when you encounter the error:

Replace:

public override func evaluateJavaScript(_ javaScriptString: String, completionHandler: ((Any?, Error?) -> Void)? = nil)

With:

open override func evaluateJavaScript(_ javaScriptString: String, completionHandler: (@MainActor (Any?, (any Error)?) -> Void)? = nil)

Additionally, I was facing package-related errors, so I updated the Firebase packages according to my Flutter version. Now, the app is finally running on iOS 18.

After that, I encountered a "command non-zero exit" error. The solution for this is to make changes within the Build Settings of the Runner project, as shown in the screenshot below.

Screenshot_1

Thank you.

amit-iconflux commented 1 month ago

+1

shivraj-walke-bbi commented 1 month ago

+1

shivraj-walke-bbi commented 1 month ago

Hello, folks I found a temporary solution for the issue in Xcode. In the InAppWebView class under the iOS folder, you need to replace the following code in the Java file when you encounter the error:

Replace:

public override func evaluateJavaScript(_ javaScriptString: String, completionHandler: ((Any?, Error?) -> Void)? = nil)

With:

open override func evaluateJavaScript(_ javaScriptString: String, completionHandler: (@MainActor (Any?, (any Error)?) -> Void)? = nil)

Additionally, I was facing package-related errors, so I updated the Firebase packages according to my Flutter version. Now, the app is finally running on iOS 18.

After that, I encountered a "command non-zero exit" error. The solution for this is to make changes within the Build Settings of the Runner project, as shown in the screenshot below.

Screenshot_1

Thank you.

This Not working. for me

plusema86 commented 1 month ago

This is an issue with xcode 16. What worked for me was to install previous version of xcode 15.4 using xcodes and then changing command line tools version in xcode locations settings to 15.4 instead of 16 and voila, everything is back to working again 😄

This worked for me, but since I upgraded MacOS to Sequoia, I had to perform these additional steps

pichillilorenzo commented 1 month ago

Released new version 6.1.0 with the fix, thanks.

felipecastrosales commented 1 month ago

Hello everyone! I opened an issue https://github.com/pichillilorenzo/flutter_inappwebview/issues/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. :)

github-actions[bot] commented 4 weeks ago

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.