skip to Main Content

After updating my macOS version to 15.0 and updating Xcode to Version 16.0, my application can’t get compiled and shows me this error:

Swift Compiler Error (Xcode): Method does not override any method from its superclass
/Users/userName/.pub-cache/hosted/pub.dev/flutter_inappwebview-5.8.0/ios/Classes/InAppWebView/InAppWebView.swift:1235:25

Could not build the application for the simulator.
Error launching application on iPad Air 13-inch (M2).

For sure it’s because of the new Xcode update, but how do I solve it?

I tried:

  • changing some code in InAppWebView.swift:1235:25 file that I think can work.
  • cleaning the project.

Both did not help.

2

Answers


  1. Chosen as BEST ANSWER

    To solve the error on iOS (Android requires more changes):

    1. upgrade to the latest flutter version: flutter upgrade
    2. then run flutter pub upgrade --major-versions: this will get the most updated and compatibility versions of the packages in Android and IOS and flutter
    3. then just run flutter clean && flutter pub get

  2. Please try the solution mentioned in this Stack Overflow answer:

    The latest version of flutter_inappwebview, 6.1.0+1, has a fix for this issue.

    Just update to version 6.1.0+1 in your pubspec.yaml, like this:

    flutter_inappwebview: ^6.1.0+1

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search