iOS development: Bitcode introduces and uses Cocoapods to appear "target overrides the ' other_ldflags ' ..." solution

Source: Internet
Author: User

In development, it is unavoidable to introduce a third-party library, but because of library problems, many errors occur. Such as:

1. Because some third-party libraries do not contain bitcode, you will get an error:

Once using xcode7.1, found compile failure, error message:

Umeng MESSAGE.SDK does not contain bitcode. You must rebuild it with Bitcode enabled (Xcodesetting enable_bitcode), obtain a updated library from the vendor, or DISA Blebitcode for this target. For Architecture arm64

Said I imported the Friend League Push SDK does not contain bitcode.

Looked up a lot of information:

Bitcode is an intermediate form of code that is compiled by a 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. 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.

Its English:

Bitcode is an intermediate representationof a compiled program. Apps upload to ITunes Connect that contain Bitcodewill is compiled and linked on the App Store. Including Bitcode would allowapple to re-optimize your app binary on the future without the need to submit anew version of Your app to the store.

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

You must rebuild it with Bitcode enabled (Xcode setting Enable_bitcode), obtain a updated library from the vendor, Ordisab Le Bitcode for this target. For Architecture arm64

Either let the third-party library support or turn off the 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.

If we open the Bitcode, the following interface will also have a bitcode option when submitting the package:

The above method can be compiled, but this will not be archive, if you want to submit the App Store can get an IPA package via itunes, upload via Xcode's own submission tool.

2. It's really handy to import a development package using cocoapods, but there are a lot of weird things that can happen when you start importing using pod install:

Such as

To tell the truth this warning at the outset I did not control, but in the project to modify the error, but modified for a long time, or such a mistake, really the more wrong, the method is not used extremely.

The error at first appears to be: not found find _lipods

Finally found on the Internet:

(1) Open the folder where the project is located, locate the. xcodeproj file, and then display the package contents, locate the Project.pbxproj file, as follows:

(2) Open with a text editor and look for ' other_ldflags ' this thing, delete the place about this thing (there should be everywhere), such as:

(3) After the deletion, the terminal re-update, as follows (there is no following two yellow exclamation point, resolved)

(4) in the compilation run our project, compile through ~

iOS development: Bitcode introduces and uses Cocoapods to appear "target overrides the ' other_ldflags ' ..." solution

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.