Archiving project fails with error "All frameworks and dylibs for bitcode must be generated from Xcode Archive"
tareksabry1337 opened this issue · 7 comments
After running pod_builder init
and pod_builder build_all
I tried to archive my application and I ran into an error related to bitcode being set to NO for the Pods and YES for my project so I went ahead and modified the flag under build_settings
to "ENABLE_BITCODE": "YES"
then ran pod_builder build_all again then I tried to archive once more and got this error
Environment:
- Xcode 11.5
- Cocoapods 1.9.3
- PodBuilder 1.9.4
PodBuilder.json :-
{
"project_name": "Ruwais",
"spec_overrides": {
"Google-Mobile-Ads-SDK": {
"module_name": "GoogleMobileAds"
}
},
"skip_licenses": [
],
"skip_pods": [
"GoogleMaps"
],
"force_prebuild_pods": [
"Firebase",
"GoogleTagManager"
],
"build_settings": {
"ENABLE_BITCODE": "YES",
"GCC_OPTIMIZATION_LEVEL": "s",
"SWIFT_OPTIMIZATION_LEVEL": "-Osize",
"SWIFT_COMPILATION_MODE": "wholemodule",
"CODE_SIGN_IDENTITY": "",
"CODE_SIGNING_REQUIRED": "NO",
"CODE_SIGN_ENTITLEMENTS": "",
"CODE_SIGNING_ALLOWED": "NO"
},
"build_settings_overrides": {
},
"build_system": "Legacy",
"license_filename": "Pods-acknowledgements",
"subspecs_to_split": [
],
"lfs_update_gitattributes": false,
"lfs_include_pods_folder": false
}
You should disable bitcode in the project.
It's not possible to use bitcode along with prebuilding frameworks ?
The benefits of enabling bitcode are generally less that the problems you run into. Just as an example most crash reporting tools like Firebase require dSYMs to properly symbolicate crash reports. When enabling bitcode you have to manually download them from appstoreconnect after you upload your build and apple rebuild the app on their side. Is there any particular reason you have bitcode enabled?
Just as a further reference see https://docs.microsoft.com/en-us/appcenter/diagnostics/ios-symbolication#bitcode
So initially I thought bitcode was used to reduce the application size downloaded from the AppStore but after reading through various sources I don't think this is correct (though I swear I have read it somewhere lol) anyways, I disabled bitcode and everything looks ok.
What are your thoughts on watchOS / tvOS targets though ? Since those require bitcode to be enabled.
What are your thoughts on watchOS / tvOS targets though ? Since those require bitcode to be enabled.
Bitcode support might be added in the future. For the time being I think (but never tried) that you can enable bitcode only for the watchos target. Shared frameworks should not be prebuilt though.
Thanks for your support and effort on this, closing this issue.