SDK does not contain bitcode ios - ios

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.

Related

WebRTC' does not contain bitcode You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE)

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.

Xcode 7 Fails to Archive

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

Unable to export archive with Here Maps and Swift 2.2, xcode 7.3

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

Weibo iOS SDK Bitcode error when archiving with Xcode7.1

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

Google Cloud Messaging Bitcode, linker command failed

I'm trying to build my app for IOS device, but receive the error:
d: '/PathToApp/Pods/Google/Libraries/libGGLCloudMessaging.a(GGLContext+CloudMessaging.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)
Clearly it states that Google Cloud Messaging does not contain bitcode. Turning off bitcode for both my app project and the 'Pods' project does successfully Build my application, but of course I want to follow Apple standards and have it enabled. Any way to solve this? Just wait for google?
I've marked this as an issue on GitHub, they said that it will be added in the next release.
https://github.com/google/gcm/issues/91
So, yes, We do have to wait for Google or any other experienced developer to release a bitcode version of Google Cloud Messaging.

Resources