Eneko Alonso
Eneko Alonso

Reputation: 19722

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.

enter image description here

Any help would be appreciated. Thanks for your time.

Upvotes: 2

Views: 1352

Answers (3)

ralepinski
ralepinski

Reputation: 1766

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

Upvotes: 0

Gautam Jain
Gautam Jain

Reputation: 2911

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.

Upvotes: 1

Chris Allinson
Chris Allinson

Reputation: 1892

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).

enter image description here

Upvotes: 8

Related Questions