Closed MyBuzzTechnologies closed 3 years ago
Thanks for reporting. A few questions:
I wasn't able to reproduce this using the following steps:
flutter packages get
(https://firebase.google.com/docs/flutter/setup),Here's a screenshot showing the state (app running, and Firebase detecting traffic):
I have Xcode 12.0 and cocoapods 1.9.3 (I don't know if this is relevant) installed.
Is your project set up differently than this?
Everything is fine when you try to use it on an iOS simulator, problems arise when you try to install an app on a real iPhone or build an archive.
Error log:
ld: bitcode bundle could not be generated because '/Users/genix/Library/Developer/Xcode/DerivedData/Runner-btxtvcidjpwqqagvqtlbpyewvlyw/Build/Products/Debug-iphoneos/PromisesObjC/FBLPromises.framework/FBLPromises' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '/Users/genix/Library/Developer/Xcode/DerivedData/Runner-btxtvcidjpwqqagvqtlbpyewvlyw/Build/Products/Debug-iphoneos/PromisesObjC/FBLPromises.framework/FBLPromises' for architecture arm64
https://github.com/flutter/flutter/issues/67285 <- repro steps
Thanks for the extra info. I was able to repro.
I don't see bitcode being an option in pod spec. I think the consumer is meant to control enablement. Two options:
Manually enable (note that you'll have to manually enable bitcode for all targets, and not just PromisesObjc... I think PromisesObjc just happens to be the first failure here):
Add a post_install script to your Podfile that enables bitcode for all targets (the inverse of this):
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'YES'
end
end
end
Option 2 is probably more maintainable. This worked for me, so I'll go ahead and close this. Please reopen if it doesn't help. Thanks!
When setting Enable BITCODE = Yes in a Flutter iOS project (within Xcode), building the project fails as this package doesn't enabled bitcode.
What makes this worse is that this package is a dependency within the FlutterFire packages so adding any Firebase packages triggers this error when building.
The only solution is to keep bitcode disabled for the Flutter project, which stops us being able to add a WatchOS extension.