Compile error caused by Bitcode

Source: Internet
Author: User

This error is reported when the xcode7.1 is archive.

Ld:object contains invalid Bitcode:/users/xxx/umsocial_sdk_extra_frameworks/wechat/libwechatsdk.a (WECHATAUTHSDK.O ) for Architecture arm64

Clang:error:linker command failed with exit code 1 (use-v to see invocation)

This error is reported when the xcode7.2 is archive.

Clang:error:unable to execute command:segmentation fault:11

Clang:error:linker command failed due to signal (use-v to see invocation)


In Xcode 7, when we create a new iOS program, the Bitcode option is set to Yes by default. We can see this setting in the "Build Settings", "Enable bitcode" option. However, what we need to consider now is three platforms: Ios,mac Os,watchos.

For Ios,bitcode is optional, for Watchos,bitcode is required, and Mac OS is not supported for Bitcode.


Therefore, if our project needs to support Bitcode, it is necessary to require all third-party libraries that are introduced to support Bitcode.


In the official document APP distribution Guide–app thinning (IOS, WatchOS) section, the following definition is found:

Bitcode is an intermediate representation of a compiled program. Apps upload to ITunes Connect that contain bitcode'll be compiled and linked on the App Store. Including Bitcode'll allow Apple to re-optimize your app binary on the future without the need to submit a new version O F your app to the store.


The Bitcode is an intermediate form of code that is compiled by the program. Programs that contain Bitcode configuration will be compiled and linked on the App store. Bitcode allows Apple to re-optimize the binary files of the program at a later stage without having to resubmit a new version to the App Store.


In the What's New in Xcode-new Features in Xcode 7, there is a description of the following:


Bitcode. When you archive for submission to the app Store, Xcode would compile your app into an intermediate representation. The App Store would then compile the bitcode to the the or the executables as necessary.


When the program is submitted to the App Store, Xcode compiles the program into an intermediate representation (Bitcode). The App Store then compiles the botcode into an executable 64-bit or 32-bit program.


Solution Solutions

Build settings, set enable Bitcode to No

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.