When I try with cordova build ios or cordova run ios, the build is success and deploy to simulator. However, when I try to run it in XCode to deploy it to device, the build end up with this error:
ld: 'MyApp/Plugins/com.phonegap.plugins.facebookconnect/FacebookSDK.framework/FacebookSDK(FBLikeButtonBackgroundSelectedPNG.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
If I remove the facebook plugin (https://github.com/Telerik-Verified-Plugins/Facebook), it will build success. How can I fix it?
Related
Trying to archive React Native iOS app in XCode
facing that issue
'/Users/mac/Library/Developer/Xcode/DerivedData/MalaebappV3-booqrwdhpgaifkchtlgmmtgyayxd/Build/Intermediates.noindex/ArchiveIntermediates/MalaebappStage/BuildProductsPath/Release-iphoneos/XCFrameworkIntermediates/FBAEMKit/FBAEMKit.framework/FBAEMKit'
does not contain bitcode. You must rebuild it with bitcode enabled
(Xcode setting ENABLE_BITCODE), obtain an updated library from the
vendor, or disable bitcode for this target. file
'/Users/mac/Library/Developer/Xcode/DerivedData/MalaebappV3-booqrwdhpgaifkchtlgmmtgyayxd/Build/Intermediates.noindex/ArchiveIntermediates/MalaebappStage/BuildProductsPath/Release-iphoneos/XCFrameworkIntermediates/FBAEMKit/FBAEMKit.framework/FBAEMKit'
for architecture arm64
that same code archive normally in M1 chip mac, but fire this issue in my intel one
also, I can run the code normally in the simulator, but the archive process never success and fire that above error
My app works on the simulator when I run: npx react-native run-ios
However when I try to get the ipa file by 'Archive'-ing it via the .xcworkspace
I get the following error regarding WebRTC and bitcode.
How to fix this issue?
ld:
'/Users/bliss/Library/Developer/Xcode/DerivedData/DanceConnectyCube-czcpkmpwkpsbethjfvbfindeabwg/Build/Intermediates.noindex/ArchiveIntermediates/DanceConnectyCube/BuildProductsPath/Release-iphoneos/XCFrameworkIntermediates/react-native-webrtc/WebRTC.framework/WebRTC'
does not contain bitcode. You must rebuild it with bitcode enabled
(Xcode setting ENABLE_BITCODE), obtain an updated library from the
vendor, or disable bitcode for this target. file
'/Users/bliss/Library/Developer/Xcode/DerivedData/DanceConnectyCube-czcpkmpwkpsbethjfvbfindeabwg/Build/Intermediates.noindex/ArchiveIntermediates/DanceConnectyCube/BuildProductsPath/Release-iphoneos/XCFrameworkIntermediates/react-native-webrtc/WebRTC.framework/WebRTC'
for architecture arm64 clang: error: linker command failed with exit
code 1 (use -v to see invocation)
you need to remove bitcode in your ios project setting in xcode target->build settings-> enable bitcode or use a custom webrtc build that enable it at compile time (huge build).
I made one here
edit:
a build with bitcode and swiftmodule support
This Repo also have sh script that explain the procedure.
For those came here with the same error:
If you are trying to debug your app in your iPhone you have to select bitcode=no in order to work.
I am trying to archive a project in Xcode (9.2) and I Get the below error.
ld: bitcode bundle could not be generated because '/Users/myUser/Documents/iOSApps/Test/Pods/AWSCognitoIdentityProviderASF/AWSCognitoIdentityProviderASF/Internal/libAWSCognitoIdentityProviderASF.a(AWSCognitoIdentityASF.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Based on other StackOverflow answers, I have set Enable BitCode -> No within my App Build Settings
Below is the image of the BitCode settings in the App. However, I still get the above error. Could some one please help me resolve this issue ?
I have a sample swift video chat app that I build with the help from ooVoo framework. The app builds and runs as expected when I simply run it from Xcode on my iPhone 5s phone. When I switch the device to 'Generic iOS Device' and run 'Product'->'Archive' to get the app ready for test, flight I get a linker error.
ld: bitcode bundle could not be generated because
'/Users/Shared/ooVooSDK/lib/ooVooSDK.framework/ooVooSDK(SdkResult.o)'
was built without full bitcode. All object files and libraries for
bitcode must be generated from Xcode Archive or Install build for
architecture armv7 clang: error: linker command failed with exit code
1 (use -v to see invocation)
What am I missing? We have the ooVoo framework version 2.2.0.72.
You have to disable bitcode for your app if all the frameworks aren't built with bitcode support.
I updated to XCode 7 today. As suggested in the Cordova Facebook Plugin I cloned the git repo and am installing the plugin from there. Before the update to XCode 7 I had no problems building. Now I am getting the below error.
Error:
ld: 'App/Plugins/phonegap-facebook-plugin/FacebookSDK.framework/FacebookSDK(FBLikeButtonBackgroundSelectedPNG.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any thoughts?
I tried removing and re-adding the ios platform with no luck.
Also this builds fine to the emulator.
You have to disable bitcode (next cordova ios release will come with bitcode disabled)
You can do that on the xcode project, open the .xcodeproj on yourProject/platforms/ios/, and on the project build settings search for ENABLE_BITCODE and set it to NO
Or you can go to /platforms/ios/cordova and add this line on the build.xcconfig
ENABLE_BITCODE = NO