Gino
Gino

Reputation: 61

When running the App, I get the error: Cannot find 'webviewController' in scope

I have searched the internet but cannot find others with the same problem. Does any one know how to fix the below error?

After updated XCode to version 14.0, my Flutter app failed to build. I have found out that the problematic package is html_editor_enhanced. If I remove it, then the build is successful, but I need it for allowing WYSIWYG editor. I see that it depends on another package called flutter_inappwebview, so I added it, but to no avail. When I try to build, the error in VSCode is:

Swift Compiler Error (Xcode): Cannot find 'webviewController' in scope /Users/<username>/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.3+7/ios/Classes/InAppWebView/FlutterWebViewFactory.swift:32:8 2

Swift Compiler Error (Xcode): Cannot find 'webviewController' in scope /Users/<username>/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.3+7/ios/Classes/InAppWebView/FlutterWebViewFactory.swift:33:15

And in XCode, the error is:

Cannot find 'webviewController' in scope

Below is the screenshot from XCode. enter image description here

Upvotes: 0

Views: 3369

Answers (1)

Gino
Gino

Reputation: 61

running the following command fixed the problem: flutter pub cache repair

Upvotes: 1

Related Questions