Ryan Kreager
Ryan Kreager

Reputation: 3581

Xcode and Flutter Plugin: Could not find or use auto-linked framework 'Flutter'

I'm running into an issue with archiving my app for the app store. Here are the pertinent facts:

  1. I have an iOS app written in Objective-C, with cocoapods for libraries.
  2. The app also has a sister project, a Flutter module that displays a screen inside the iOS app. I followed these instructions to get the module built: https://flutter.dev/docs/development/add-to-app/ios/project-setup#create-a-flutter-module
  3. The app compiles fine in development mode - I can compile and run it on the simulator or on a device such as an iPhone.
  4. When I try to archive it for the store, this happens:
Undefined symbols for architecture armv7:
  "_FlutterMethodNotImplemented", referenced from:
      ___47+[FLTPathProviderPlugin registerWithRegistrar:]_block_invoke in FLTPathProviderPlugin.o
  "_OBJC_CLASS_$_FlutterError", referenced from:
      objc-class-ref in FLTPathProviderPlugin.o
  "_OBJC_CLASS_$_FlutterMethodChannel", referenced from:
      objc-class-ref in FLTPathProviderPlugin.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Just to be clear, this compiles just fine for development - it is only when I switch to archiving it that the compilation fails. Your assistance is most appreciated!

Upvotes: 5

Views: 3313

Answers (1)

rehxll
rehxll

Reputation: 106

I had this problem and spent all day trying to fix it.

This worked for me:

  • Delete the iOS folder in your flutter project
  • Run flutter create .
  • If you made any changes to your pod file, plists, etc. Update them now
  • Install your pods and run.

Upvotes: 9

Related Questions