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 Beta] Override evaluateJavaScript error when build #2201

Closed
GabriellArthur opened this issue Jun 27, 2024 · 26 comments
Closed

[Xcode 16 Beta] Override evaluateJavaScript error when build #2201

GabriellArthur opened this issue Jun 27, 2024 · 26 comments

Comments

@GabriellArthur
Copy link

GabriellArthur commented Jun 27, 2024

Check the Showcase page to see an open list of Apps built with Flutter and Flutter InAppWebView.

If you are using the Flutter InAppWebView plugin and would like to add your App there,
follow the instruction on the Submit App page!

Captura de Tela 2024-06-27 às 15 50 47

ios WKWebView [Override evaluateJavaScript]

Copy link

👋 @GabriellArthur

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!

@suhailzoft
Copy link

Same issue here

@GabriellArthur
Copy link
Author

I want to remove the override and remove some calls from it, so it may be breaking for you but for me it is working
https://github.com/GabriellArthur/flutter_inappwebview

@shubhamsinghmutualmobile

I want to remove the override and remove some calls from it, so it may be breaking for you but for me it is working https://github.com/GabriellArthur/flutter_inappwebview

This worked for me, thank you! 👏 Maybe you can raise a PR and see if it gets accepted?

@lucas-sesti
Copy link

Same issue here, hope they accept your PR.

@channoori
Copy link

In iOS 18.0 beta, the closure of the evaluateJavaScript method was changed in the iOS 18.0 beta, causing the error, so it seems that only the method needs to be changed in the override

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

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

@hwr12
Copy link

hwr12 commented Jul 16, 2024

@GabriellArthur
Thanks for the fork version but I am getting this error also.
Any idea on how to fix this?
IntelliJ IDEA-2024 07 16 14 33-003960

@hwr12
Copy link

hwr12 commented Jul 16, 2024

@GabriellArthur Thanks for the fork version but I am getting this error also. Any idea on how to fix this? IntelliJ IDEA-2024 07 16 14 33-003960

Fixed it. It was because I didn't update the xcodebuild cli version to the latest 16

@frapeti
Copy link

frapeti commented Jul 19, 2024

why is this closed

@maratbekovaidar
Copy link

@GabriellArthur Thanks for the fork version but I am getting this error also. Any idea on how to fix this? IntelliJ IDEA-2024 07 16 14 33-003960

Fixed it. It was because I didn't update the xcodebuild cli version to the latest 16

How you update xcodebuild cli version to 16?

@aokisinn
Copy link

Does anyone know why it's closed?

@ConnorDykes
Copy link

flutter_inappwebview:
git:
url: https://github.com/GabriellArthur/flutter_inappwebview.git
ref: master

this is giving my this error, any ideas?

Could not find a file named "pubspec.yaml" in https://github.com/GabriellArthur/flutter_inappwebview.git caa355f.

@shubhamsinghmutualmobile
Copy link

shubhamsinghmutualmobile commented Aug 7, 2024

flutter_inappwebview: git: url: https://github.com/GabriellArthur/flutter_inappwebview.git ref: master

this is giving my this error, any ideas?

Could not find a file named "pubspec.yaml" in https://github.com/GabriellArthur/flutter_inappwebview.git caa355f.

Try adding path to your configuration like this:

flutter_inappwebview:
  git:
    url: https://github.com/GabriellArthur/flutter_inappwebview.git
    # Add this
    path: flutter_inappwebview
    ref: master

Reason: The default path is the root of the url you provide, and the required pubspec.yaml file should exist in the provided path which in our case, does not. That's why we need to navigate to a path that contains a pubspec.yaml which in our case, I assume to be the dart library flutter_inappwebview and not a platform-specific implementation like flutter_inappwebview_android.

@hansraj-flyzy
Copy link

I want to remove the override and remove some calls from it, so it may be breaking for you but for me it is working https://github.com/GabriellArthur/flutter_inappwebview

Worked for me as well

@tnitsiri
Copy link

dependencies:
  flutter_inappwebview:
    git:
      url: https://github.com/GabriellArthur/flutter_inappwebview.git
      ref: master
      path: flutter_inappwebview
dependency_overrides:
  flutter_inappwebview_platform_interface:
    git:
      url: https://github.com/GabriellArthur/flutter_inappwebview.git
      ref: master
      path: flutter_inappwebview_platform_interface
  flutter_inappwebview_android:
    git:
      url: https://github.com/GabriellArthur/flutter_inappwebview.git
      ref: master
      path: flutter_inappwebview_android
  flutter_inappwebview_ios:
    git:
      url: https://github.com/GabriellArthur/flutter_inappwebview.git
      ref: master
      path: flutter_inappwebview_ios
  flutter_inappwebview_macos:
    git:
      url: https://github.com/GabriellArthur/flutter_inappwebview.git
      ref: master
      path: flutter_inappwebview_macos
  flutter_inappwebview_web:
    git:
      url: https://github.com/GabriellArthur/flutter_inappwebview.git
      ref: master
      path: flutter_inappwebview_web

@2paperstar 2paperstar mentioned this issue Sep 17, 2024
2 tasks
@Dararii
Copy link

Dararii commented Sep 17, 2024

This issue should not be marked as closed because the solution is not merged yet.

@antOnioOnio
Copy link

Is this going to be merged soon?

@Tomic-Riedel
Copy link

We really do need this now that Xcode 16 is out of beta (and the issue still exists).

@thanhnn-bap-jp
Copy link

Just updated Xcode 16 and got this issue. Please merge.

@AndreTsao
Copy link

Why u closed this issue? the author of (https://github.com/pichillilorenzo/flutter_inappwebview) has not solved it.

@sapar-io
Copy link

Why the issue is closed??

@alaudiero
Copy link

The issue should not be closed because the problem is not resolved yet.

@fwilliamconceicao
Copy link

@pichillilorenzo are you having some trouble understanding the issue wasn't solved yet and only the @GabriellArthur PR it's the solution?

@arrrrny
Copy link

arrrrny commented Sep 20, 2024

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.

@GabriellArthur
Copy link
Author

Guys, the issue was closed a while ago because it was a temporary solution but I believe that with the new XCode 16, there is already a PR waiting for review.

#2274

@Mahmoudhodhod
Copy link

In iOS 18.0 beta, the closure of the evaluateJavaScript method was changed in the iOS 18.0 beta, causing the error, so it seems that only the method needs to be changed in the override

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

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

worked for me. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests