Recently I updates the Xcode to 16.0, flutter to 3.24.3 and also mac to 15.0.
After that I updates all the packages of used libraries to latest version using the command flutter pub upgrade --major-versions
.
after that flutter clean and flutter pub get
is executed.
After all of these steps, android app is working fine but the IOS app gives some error while running.
error:
Swift Compiler Error (Xcode): Method does not override any method from its superclass
/Users/aibelindia/.pub-cache/hosted/pub.dev/flutter_inappwebview-5.8.0/ios/Classes/InAppWebView/InAppWebView.swift:1225:25
Swift Compiler Error (Xcode): Ambiguous use of 'evaluateJavaScript(_:completionHandler:)'
/Users/user/.pub-cache/hosted/pub.dev/flutter_inappwebview-5.8.0/ios/Classes/InAppWebView/InAppWebView.swift:876:20
Swift Compiler Error (Xcode): Ambiguous use of 'evaluateJavaScript(_:completionHandler:)'
/Users/user/.pub-cache/hosted/pub.dev/flutter_inappwebview-5.8.0/ios/Classes/InAppWebView/InAppWebView.swift:879:16
Swift Compiler Error (Xcode): Ambiguous use of 'evaluateJavaScript(_:completionHandler:)'
/Users/user/.pub-cache/hosted/pub.dev/flutter_inappwebview-5.8.0/ios/Classes/InAppWebView/InAppWebView.swift:888:20
Swift Compiler Error (Xcode): Ambiguous use of 'evaluateJavaScript(_:completionHandler:)'
/Users/user/.pub-cache/hosted/pub.dev/flutter_inappwebview-5.8.0/ios/Classes/InAppWebView/InAppWebView.swift:891:16
Swift Compiler Error (Xcode): Ambiguous use of 'evaluateJavaScript(_:completionHandler:)'
/Users/user/.pub-cache/hosted/pub.dev/flutter_inappwebview-5.8.0/ios/Classes/InAppWebView/InAppWebView.swift:1121:25
Swift Compiler Error (Xcode): Ambiguous use of 'evaluateJavaScript(_:completionHandler:)'
/Users/user/.pub-cache/hosted/pub.dev/flutter_inappwebview-5.8.0/ios/Classes/InAppWebView/InAppWebView.swift:1621:8
Swift Compiler Error (Xcode): Ambiguous use of 'evaluateJavaScript(_:completionHandler:)'
/Users/user/.pub-cache/hosted/pub.dev/flutter_inappwebview-5.8.0/ios/Classes/InAppWebView/InAppWebView.swift:2618:21
Swift Compiler Error (Xcode): Ambiguous use of 'evaluateJavaScript(_:completionHandler:)'
/Users/user/.pub-cache/hosted/pub.dev/flutter_inappwebview-5.8.0/ios/Classes/InAppWebView/InAppWebView.swift:2833:17
Anyone have a solution for this?
Short Answer
update flutter_inappwebview
version to 6.1.0 to fix this issue
Details
Walking you through the process so that similar issues can be resolved via you in future also.
Swift Compiler Error (Xcode): Method does not override any method from its superclass
/Users/aibelindia/.pub-cache/hosted/pub.dev/flutter_inappwebview-5.8.0/ios/Classes/InAppWebView/InAppWebView.swift:1225:25
the first line tells that it’s not overriding any function from superclass, means the signature is changed. Intent here is to override the correct method.
Go to flutter_inappwebview
github to check their issues, if anyone has already raised it. Fortunately it’s already been raised and resolved. You can go through this issue thread for more details.
The library’s author release 6.1.0 which fixes this.
Descifrador is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
4