New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No type or protocol named 'FlutterPlugin' #62102
Comments
Hi @casualcoder404, |
Related to 58594 |
Hey @darshankawar thanks for the reply. I checked that solution but I'm afraid of implementing it as there are many other configurations made to existing project for say implementing firebase and NotificationServiceExtensions etc. Also it is a live app on app store. Isn't there any way to fix the existing project, please. |
Hi @casualcoder404, |
Yes sir, I tried this but didn't help. (I tried v 0.5.7+3 and not v 0.5.8 as it is giving some errors, but I don't think that matters) |
Those errors mean it can't find the Flutter.framework symbols.
|
$ file ios/Flutter/Flutter.framework/Flutter |
The workaround mentioned by @darshankawar worked. The only problem for me was changing the name to create new project, as it'll change other configurations such as app store id and firebase integration etc. But I was able to create a new project in different folder, with the same name. And copied lib, pubscec and android folder to it with some small changes to xcode and it worked. Thanks everyone. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
When I try to flutter build ios or just run on iOS simulator, it fails with following error:
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
In file included from
/Users/hh/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.7+3/ios/Classes/FLTShare
dPreferencesPlugin.m:5:
/Users/hh/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.7+3/ios/Classes/FLTShare
dPreferencesPlugin.h:7:51: error: no type or protocol named 'FlutterPlugin'
@interface FLTSharedPreferencesPlugin : NSObject
^
/Users/hh/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.7+3/ios/Classes/FLTShare
dPreferencesPlugin.m:11:41: error: no type or protocol named 'FlutterPluginRegistrar'
+ (void)registerWithRegistrar:(NSObject *)registrar {
^
/Users/hh/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.7+3/ios/Classes/FLTShare
dPreferencesPlugin.m:12:3: error: use of undeclared identifier 'FlutterMethodChannel'
FlutterMethodChannel *channel = [FlutterMethodChannel methodChannelWithName:CHANNEL_NAME
^
/Users/hh/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.7+3/ios/Classes/FLTShare
dPreferencesPlugin.m:12:25: error: use of undeclared identifier 'channel'
FlutterMethodChannel *channel = [FlutterMethodChannel methodChannelWithName:CHANNEL_NAME
^
/Users/hh/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.7+3/ios/Classes/FLTShare
dPreferencesPlugin.m:12:36: error: use of undeclared identifier 'FlutterMethodChannel'
FlutterMethodChannel *channel = [FlutterMethodChannel methodChannelWithName:CHANNEL_NAME
^
/Users/hh/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.7+3/ios/Classes/FLTShare
dPreferencesPlugin.m:14:4: error: use of undeclared identifier 'channel'
[channel setMethodCallHandler:^(FlutterMethodCall *call, FlutterResult result) {
^
6 errors generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Encountered error while building for device.
And this is how it looks in xcode
[✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.4 19E287, locale en-IN)
• Flutter version 1.17.5 at /Users/hh/Developer/flutter
• Framework revision 8af6b2f (3 weeks ago), 2020-06-30 12:53:55 -0700
• Engine revision ee76268252
• Dart version 2.8.4
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/hh/Library/Android/sdk
• Platform android-29, build-tools 29.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.4.1, Build version 11E503a
• CocoaPods version 1.9.1
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 43.0.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] Connected device (1 available)
• iPad Pro (12.9-inch) (4th generation) • 7983738B-844D-4B69-98BF-D93F5F3550AB • ios •
com.apple.CoreSimulator.SimRuntime.iOS-13-4 (simulator)
• No issues found!
Please help.
The text was updated successfully, but these errors were encountered: