Static library. a files that support both armv7, armv7s, and i386 are generated in IOS.

Source: Internet
Author: User

Many third-party. a files (generally those sdks) are embedded in our xcode project, and no error is reported after they are generated. Some Careless SDK providers, or our own. in file a, an error is reported. The common error is that it is not the armv7 structure or the armv7s structure. If it is run in the simulator, it is not the i386 structure. The reason is: armv7 supports older devices than iPhone 5, armv7s is new devices like iPhone 5, ipad4, or later, and i386 is mac. These names refer to the instruction set used by the processor. Therefore, the. a file can be successfully built either on the ipad mini, but on the iPhone 5. The opposite is true. The solution is to create a. a file that fully supports various instruction sets. The premise is to generate three. a files that support the corresponding instruction set. When building a static library, the device selects different real machines and simulators, builds them separately, backs up the devices to a folder, and obtains different names. In this case, you can use the command to check the exported. the Instruction Set supported by file a, lipo-info XXX. a. Make sure the three are different before proceeding to the next step. Note: The display name of armv7s is cputype (12) cpusubtype (11) then use the command lipo-create XXXX_V7.a XXXX_V7s.a-output XXXX_all.a to synthesize them into new ones. file. Finally, replace the. a file with the error message.

Related Article

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.