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

Not working on new IOS updated #2283

Closed
2 tasks done
ghost opened this issue Sep 20, 2024 · 12 comments
Closed
2 tasks done

Not working on new IOS updated #2283

ghost opened this issue Sep 20, 2024 · 12 comments
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Sep 20, 2024

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

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

@ghost ghost added the bug Something isn't working label Sep 20, 2024
Copy link

👋 @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
Copy link

Yep, same.

@arrrrny
Copy link

arrrrny commented Sep 20, 2024

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
Copy link

nemscep commented Sep 23, 2024

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
Copy link

HarshuPatel007 commented Sep 23, 2024

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
Copy link

+1

1 similar comment
@shivraj-walke-bbi
Copy link

+1

@shivraj-walke-bbi
Copy link

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
Copy link

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

  • open a terminal
  • open folder where Xcode is installed (Applications)
  • drag and drop the Xcode app into the terminal
  • append /Contents/MacOS/Xcode
  • run the command

@pichillilorenzo
Copy link
Owner

Released new version 6.1.0 with the fix, thanks.

@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

9 participants