IOS9 error message information is a third-party library that is introduced that does not contain bitcode

Source: Internet
Author: User


Run the project with Xcode 7 on the Real Machine (IOS 9) and find that the project compiles. The following error has been reported:

LD: '/users/**/framework/sdks/polymerpay/library/mobstat/lib**sdk.a (**FORSDK.O) ' does not contain bitcode. You must rebuild it with Bitcode enabled (Xcode setting Enable_bitcode), obtain a updated library from the vendor, or dis Able Bitcode for this target. For Architecture arm64

The information obtained is the introduction of a third-party library that does not contain bitcode.

Workaround: See this setting in "Build Settings", "Enable bitcode" option debug set to no release set to Yes

What is Bitcode?

Check out the official documentation, in the APP distribution Guide–app thinning (IOS, WatchOS) section, find the following definition:

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.

Look at these two descriptions, all in the app thinning (app slimming) section, you can see that it is related to the optimization of the package.


Bitcode Configuration

In the above error message, we mentioned how to handle the problem we encountered:
You must rebuild it with Bitcode enabled (Xcode setting Enable_bitcode), obtain a updated library from the vendor, or di Sable Bitcode for this target. For Architecture arm64

Either let the third-party library support or turn off the target's bitcode option.

In fact, 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.

Through this article on the concept of Bitcode and configuration of the brief introduction, I hope that iOS developers in the project run a similar situation, can be more effective according to the above introduction to find the cause and timely processing.

IOS9 error message information is a third-party library that is introduced that does not contain bitcode

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.