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
To solve the error on iOS (Android requires more changes):
flutter upgrade
flutter pub upgrade --major-versions
: this will get the most updated and compatibility versions of the packages in Android and IOS and flutterflutter clean && flutter pub get
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