I am using Xcode 7.3.1.
My project runs perfectly on both iOS Simulator as well as my own iPhone. However, when archiving my project, I get the warnings and errors:
ld: warning: ignoring file /Users/parthsaxena/Desktop/Vantage/Vantage/Vantage/TextFieldEffects/TextFieldEffects.framework/TextFieldEffects, file was built for arm64 which is not the architecture being linked (armv7): /Users/parthsaxena/Desktop/Vantage/Vantage/Vantage/TextFieldEffects/TextFieldEffects.framework/TextFieldEffects
ld: bitcode bundle could not be generated because '/Users/parthsaxena/Desktop/Vantage/Vantage/Pods/FirebaseAppIndexing/Frameworks/FirebaseAppIndexing.framework/FirebaseAppIndexing(FIRAppIndexing.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)
You may have noticed that I am using both the Firebase and TextFieldEffects frameworks in my project.
Is there any solution to this problem?
Your library was compiled without bitcode, but the bitcode option is enabled in your project settings. Say NO to Enable Bitcode in your target Build Settings and the Library Build Settings to remove the warnings.
For those wondering if enabling bitcode is required:
Note: For iOS apps, bitcode is the default, but optional. If you provide bitcode, all apps and frameworks in the app bundle need to include bitcode. For watchOS apps, bitcode is required.
https://developer.apple.com/library/prerelease/watchos/documentation/IDEs/Conceptual/AppDistributionGuide/AppThinning/AppThinning.html
Firebase doesn't support bitcode at the moment (the situation should change in a short time). You should set Build Settings -> Enable Bitcode to NO.
I was getting this error because i didn't have enough free space on my mac
Related
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 have quite a complicated project structure consisting of many frameworks and dependencies.
I have a framework target which contains all the classes I include in my WatchKit extensions. This requires the framework be built with Bitcode support (which it is).
I have no trouble archiving my app from Xcode's Product menu, but when I try to build manually using the Release configuration, I run into this linker error.
ld: bitcode bundle could not be generated because '/Users/ricky/Library/Developer/Xcode/DerivedData/Coventry-ammghqykwgwisogpgstgfdmkzqjh/Build/Products/Release-watchos/Silverlake-Watch.framework/Silverlake-Watch' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build for architecture armv7k
clang: error: linker command failed with exit code 1 (use -v to see invocation)
There are then several other errors that stem from this framework not properly linking. Does anyone have any idea what would be causing different build behaviour between the Xcode Archive process and my manual Release build?
We are using HERE iOS SDK Premium Edition with Swift in Xcode 7.3 but when we try to exportArchive with the command:
xcodebuild -exportArchive -exportOptionsPlist exportOptions.plist -archivePath build/App.xcarchive -exportPath build
The exportArchive fails and we run into the error:
ld: bitcode bundle could not be generated because '<path to workspace>/HEREMaps/NMAKit.framework/NMAKit(NMAApplicationContext.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)
Does Here maps support Swift with Xcode 7.3? Is there a project setting we need to set to get it to work?
We are able to run the app in simulator without issue.
Bitcode is a new feature introduces with Xcode 7.
Bitcode is an intermediate representation of a compiled program. Apps
you upload to iTunes Connect that contain bitcode will be compiled and
linked on the store. Including bitcode will allow Apple to re-optimize
your app binary in the future without the need to submit a new version
of your app to the store.
Reference AppThinning Documentation
From the error it seems that the HERE SDK is not bitcode enabled and in your project settings bitcode is enabled. For fixing the issue, there are two possible options:
Use bitcode enabled version of Here SDK (If the vendor provided a bitcode enabled version)
Disable the bitcode in your Build Settings
In one of my project i am integrating paytab ios sdk while integration error occurs that is
a(PayTabCardReaderViewController.o)' does not contain bitcode.
I have try with enable bitcode=No
but after enable bitcode=no it show me more 40 erros,any one know can we disable bitcode for only 1 sdk/library only ?
Error: a(PayTabCardReaderViewController.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 arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Solution You have to disable bitcode option in the "Build Settings" tab on the workspace / project level. Do not forget CocoaPods if you use it. Manual : how to ENABLE_BITCODE in xcode 7?
What's the "Bitcode"? Bitcode is an intermediate representation of a compiled program. Apps you upload to iTunes Connect that contain bitcode will be compiled and linked on the store. Including bitcode will allow Apple to re-optimize your app binary in the future without the need to submit a new version of your app to the store.
Environment
Xcode 7.1
OS X 10.11.1
Archiving iOS with minimum target requirement 8.0
Podfile
pod "WeiboSDK", :head
Error Message
ld: bitcode bundle could not be generated because
'/Users/XX/code/iOS/Pods/WeiboSDK/libWeiboSDK/libWeiboSDK.a(WBSDKNormalWebViewController.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)
It's OK when building, but will fail when archiving
download latest version of WeiboSDK. It supported bitcode
weibo_ios_sdk
1.If your app doesn't need bitcode (for Apple Watch).you should check you settings:
PROJECT/TARGETS -> Build Settings -> Enable Bitcode -> NO
2.If you need the Bitcode enable in your project,you should import the newest SDK from Weibo which has been build by Bitcode enabled.
The problem you have met is that if you want to enable your Bitcode in your project,the library in your project must be build by "Enable Bitcode".
About Bitcode,the official documentation here:
https://developer.apple.com/library/prerelease/watchos/documentation/IDEs/Conceptual/AppDistributionGuide/AppThinning/AppThinning.html#//apple_ref/doc/uid/TP40012582-CH35-SW2
The "Bitcode" is one of the adaption details of iOS 9.0 or above.You should pay attention to this.Here is a good repository on Github for iOS 9 adaption details collection:
https://github.com/ChenYilong/iOS9AdaptationTips