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

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.

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

Related

Error: 'Flutter/Flutter.h' file not found

I added firebase_crashlytics to my Flutter project and followed the Firebase guideline in order to install it.
On flutter run the app works well without any error.
ONLY DURING flutter build ipa I get this:
Error (Xcode): 'Flutter/Flutter.h' file not found
/project/ios/Runner/GeneratedPluginRegistrant.h:9:8
Error (Xcode): failed to emit precompiled header
'/Users/macnew/Library/Developer/Xcode/DerivedData/Runner-biyumwxiyqxyjkacscuqcbwbjroj/Build/Intermediates.no
index/ArchiveIntermediates/Runner/PrecompiledHeaders/Runner-Bridging-Header-swift_26UGEQJVHLD5H-clang_19ZWN9O
PIOOJI.pch' for bridging header '/project/ios/Runner/Runner-Bridging-Header.h'
Encountered error while archiving for device.
Any advice about this?
I'm using firebase_crashlytics 2.8.6 (latest version) and flutter 2.10.5 (without null-safety).
Since I tried every solution given on StackOverflow and Github (Flutter repo), here you have the solution:
Delete the "ios" folder
Run the app and create the iOS project
Inside the "ios" folder ("cd ios"), run the command "pod install"
Follow the official guide by the iOS side
This is the only solution that works.

Error Module 'flutter_secure_storage' not found when try Product ->Build for -> Profiling

well this error occurs to me when I try to make my app in production.
The app is created with flutter and I was able to create the apk for android, but when I try to do it for ios it won't let me.
The file that I am opening is Runner.xcworkspace and the problem is the import of a flutter library, it seems to me that I have to make some kind of connection with the pods.
here is the error, I want to tell you that I do not want to run the app, but to make an installer
The error that occurs when building a release (ie. flutter build ipa) and not when running a debug build is:
/[REDACTED]/ios/Runner/GeneratedPluginRegistrant.m:48:9: fatal error: module
'flutter_secure_storage' not found
#import flutter_secure_storage;
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
For me regenerating Podfile in the following way solved the issue:
rm ios/Podfile && flutter build ios
See Closed [ios][release] GeneratedPluginRegistrant.m Module not found
#43986

Tried archiving flutter project with no disc space left, can't fix errors

Question upfront: How can I thoroughly clean/repair my flutter project to allow it to run/build again?
I had been building and archiving (in Xcode) flutter projects without issue until just now.
My computer ran out of disc space mid archive and forced it to stop with "nonzero exit code".
I deleted a bunch of things on the computer to make space, and now it says there is >100gb left.
I was due for a flutter upgrade, so I ran flutter upgrade, which completed without error.
I closed android studio and Xcode and restarted my computer.
I ran flutter clean as well as clean within Xcode.
I can no longer run the app within flutter or run/archive within Xcode.
The exact errors seem variable, but here are some of them that I see:
Running from Xcode:
.../ios/Flutter/Flutter.framework/Headers/FlutterPlugin.h:292:13: Cannot find protocol declaration for 'FlutterTextureRegistry'; did you mean 'FlutterPluginRegistry'?
.../ios/Flutter/Flutter.framework/Headers/FlutterEngine.h:54:38: Cannot find protocol declaration for 'FlutterTextureRegistry'; did you mean 'FlutterPluginRegistry'?
.../.pub-cache/hosted/pub.dartlang.org/in_app_purchase-0.3.1+2/ios/Classes/FIAPReceiptManager.m:13:9: Could not build module 'Flutter'
Running from Flutter (I can't paste all of the errors... way too long):
^~~~~~~~~~~~~~~~~~~~~~
FlutterPluginRegistry
While building module 'Flutter' imported from .../.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.5/ios/Classes/FLTPathProviderPlugin.h:5:
In file included from :1:
In file included from .../Documents/Flutter/patient_medical_record/ios/Pods/../Flutter/Flutter.framework/Headers/Flutter.h:54:
In file included from .../Documents/Flutter/patient_medical_record/ios/Pods/../Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:11:
.../Documents/Flutter/patient_medical_record/ios/Pods/../Flutter/Flutter.framework/Headers/FlutterPlugin.h:395:11: note: 'FlutterPluginRegistry' declared here
#protocol FlutterPluginRegistry
^
3 errors generated.
In file included from .../.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.5/ios/Classes/FLTPathProviderPlugin.m:5:
.../.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.5/ios/Classes/FLTPathProviderPlugin.h:5:9: fatal error: could not build module 'Flutter'
#import
~~~~~~~^
4 errors generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Well this is a bummer because I can't find a clean solution, but for now I did fix it with the following:
Create a new flutter project
Copied over the lib files
Copied over other setup in random places (i.e. google services, android changes)
Copied over pubspec.yaml and ran packages get
It now works again. Clearly something went wrong in the Flutter-managed files that I don't understand. If someone else can think of a better solution to effectively reset the project, please share.

Nativescript RadSideDrawer gives symbol not available at run time error

I am following nativescript RadSideDrawer doc at:
http://docs.telerik.com/devtools/nativescript-ui/Controls/Angular/SideDrawer/getting-started, but once I started the app in ios emulator, I am getting this error:
CONSOLE ERROR file:///app/tns_modules/#angular/core/./bundles/core.umd.js:1052:24: ERROR Error: Uncaught (in promise): ReferenceError: Metadata for "TelerikUI.TKSideDrawerView" found but symbol not available at runtime.
RadSideDrawer#file:///app/tns_modules/nativescript-telerik-ui/sidedrawer/sidedrawer.js:15:38
I tried several times and always got the same error.
What's wrong with this? Is the documentation having errors here?
Thanks
It looks like there may be inconsistency and incompatibility in the used dependencies in your package.json. You can take a look at the sdkAngular repository that showcases many scenarios for using the RadSideDrawer and the other components of the nativescript-telerik-ui-pro plugin here.
Other things that you can try is to clean the project, by deleting the platforms and node_modules folders and running tns run ios after that.

Selenium for iPhone emulator compile error

when compiling the code for iWebDriver.xcodeproj I get the following error
error: There is no SDK with the name or path
'/Users/sqaresources/svn_projcts/trunk/iphone/lib/buildtime-src/cocoahttpserver/iphonesimulator3.2'
the following warnings are also shown
Missing SDK in target CocoaHTTPServer: iphonesimulator3.2
Missing SDK in target CocoaHTTPServer: iphoneos3.1.2
I'm running OSX 10.7, Xcode 4.1
Please let me know if there is anything that I can do for this issue.
Thank you
To resolve that problem, navigate to iphone-->lib-->buildtime-src-->cocoahttpserver-->CocoaHTTPServerLibrary.xcodeproj
Open CocoaHTTPServerLibrary.xcodeproj in your xcode (Make sure other instances are closed). And navigate to Build settings and change the 'BaseSDK' to 'Latest iOS(iOS4.3)'.
This should resolve the problem.....