Weibo iOS SDK Bitcode error when archiving with Xcode7.1 - ios

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

Related

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

SDK does not contain bitcode 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.

Getting Cordova error on Xcode 7 build for Facebook Plugin

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

UrbanAirship iOS SDK error in Xcode 7 when archiving: libUAirship-6.2.0.a (UAWalletAction.o)' does not contain bitcode

I have an iOS application in Swift with CocoaPods using the UrbanAirship iOS SDK via Pods as follows:
pod 'UrbanAirship-iOS-SDK'
We can verify the version installed in the Podfile.lock file:
- UrbanAirship-iOS-SDK (6.2.0):
- UrbanAirship-iOS-SDK/Core (= 6.2.0)
- UrbanAirship-iOS-SDK/Core (6.2.0)
The application builds, runs and archives properly on Xcode 6.4. In addition, it also builds and runs properly on Xcode 7 beta 6. However, when archiving in Xcode 7, I get the following error:
ld: '.../Pods/UrbanAirship-iOS-SDK/Airship/libUAirship-6.2.0.a(UAWalletAction.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)
I have updated the project build settings to disable bitcode by setting ENABLE_BITCODE to NO, both at the project and target(s) levels, as indicated on this SO answer, but the error persists.
Any help would be appreciated. Thanks for your time.
Yesterday I updated to the latest XCode7 (pre-release) and wasn't able to archive the project I was working on :( ... After struggling to build the UA SDK & other libraries myself, I simply set Enable Bitcode to NO and everything worked as it did in XCode6! :)
Update:
In addition to the project and targets in the project, Bitcode also should be disabled (by setting Enable Bitcode to No) in the CocoaPod framework targets affected (UrbanAirship-iOS-SDK in this case).
You can safely turn off Enabled Bitcode to NO if your app is not built for Watch OS.
I would also suggest using Xcode 6 to submit builds as most of the libraries won't be adding support for bitcode at least until the official Xcode 7 comes out.
Libraries with bitcode support cannot be run on Xcode 6, hence the delay in adoption.
To enable bitcode you have to build the library with Xcode 7. Xcode 7 GM was released today, so it is now possible for us to release an update to the UA SDK with bitcode enabled. Until the update, you can build the SDK from source by following https://github.com/urbanairship/ios-library.
Update:
We released 2 builds of 6.2.2, one with bitcode and one without. https://bintray.com/urbanairship/iOS/urbanairship-sdk/6.2.2/view

Resources