-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: existing-appsIntegration with existing apps via the add-to-app flowIntegration with existing apps via the add-to-app flowc: crashStack traces logged to the consoleStack traces logged to the consoleplatform-iosiOS applications specificallyiOS applications specificallyt: xcode"xcodebuild" on iOS and general Xcode project management"xcodebuild" on iOS and general Xcode project managementtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
Steps to reproduce:
- Run
flutter pub getin a module with plugins, like the samples flutter_module_using_plugin. See README for details. - Run
pod installin the host app like samples ios_using_plugin. - Open the host app xcworkspace and build for the simulator
ld: warning: ignoring file flutter_module/.ios/Flutter/engine/Flutter.xcframework/ios-armv7_arm64/Flutter.framework/Flutter, missing required architecture x86_64 in file flutter_module/.ios/Flutter/engine/Flutter.xcframework/ios-armv7_arm64/Flutter.framework/Flutter (2 slices)
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FlutterMethodChannel", referenced from:
objc-class-ref in EspressoPlugin.o
"_FlutterMethodNotImplemented", referenced from:
-[EspressoPlugin handleMethodCall:result:] in EspressoPlugin.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
flutter pub get copies a release version of the Flutter.xcframework to a known spot in the module (.ios/engine).
When the host app builds, it runs a Flutter script (xcode_backend) that copies the correct build mode version of the framework to that spot, depending on the mode you're building the host app in (Debug in the case of running the simulator). However, if you have plugins in the host app they build before the script runs, you get the linker warning because it's trying to link on the release version of the framework, and the app won't build.
Probably made worse by #73072 which changed the copied framework from debug (which can fail on archiving) to release (which can fail on the simulator).
| _copyEngineArtifactToProject(BuildMode.release, EnvironmentType.physical); |
thuong-coinhako, kikuchy, yoichi-aoyama and caio-lc-coelhomasashi-sutou
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: existing-appsIntegration with existing apps via the add-to-app flowIntegration with existing apps via the add-to-app flowc: crashStack traces logged to the consoleStack traces logged to the consoleplatform-iosiOS applications specificallyiOS applications specificallyt: xcode"xcodebuild" on iOS and general Xcode project management"xcodebuild" on iOS and general Xcode project managementtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.