Methods for merging the. Framework or (Static library. A) files of third-party real machines and emulators

Source: Internet
Author: User

When using third-party SDKs in iOS development, you will often encounter some third-party two sets of real machines and simulators. The framework (or. a) file. But developers will be very inconvenient in the development process. Here's a summary of the merging of the. Framework (or. A) files of the real machine and the simulator.

The two library files are merged in the same way, and the. framework files merge slightly differently. Let's start with the merger of. a files.

To run the terminal command:
Lipo-create/users/***/desktop/thirdparty/library/release-iphoneos/libthirdparty.a/users/***/desktop/thirdparty /library/release-iphonesimulator/libthirdparty.a-output/users/***/desktop/thirdparty/library/release/ Libthirdparty.a

The merger was successful. After merging you can verify:

Lipo-info/users/***/desktop/thirdparty/library/release/libthirdparty.a

The following information indicates that the merge was successful.

Architectures in the FAT file:/users/***/desktop/thirdparty/library/release/libthirdparty.a are:armv7 armv7s i386 x86_ Arm64
(where ARMv7, armv7s is a true machine architecture, i386 is an emulator, x86_64 supports 32-bit, and ARM64 supports 64-bit).

The way to merge. Framework files is basically the same, slightly different from merging the same name file Thirdpartyapi under Thirdpartyapi.framework. You can then replace the merged Thirdpartyapi file with the file of the same name on either the real machine or the emulator under any of the. framework files.

Terminal command:
LIPO-CREATE/USERS/***/DESKTOP/THIRDPARTY/FRAMEWORK/RELEASE-IPHONEOS/THIRDPARTYAPI.FRAMEWORK/THIRDPARTYAPI/ Users/***/desktop/thirdparty/framework/release-iphonesimulator/thirdpartyapi.framework/thirdpartyapi-output/ Users/***/desktop/thirdparty/framework/release/thirdpartyapi

The same way to verify:
Lipo-info/users/***/desktop/thirdparty/framework/release/thirdpartyapi
The same results are obtained:
Architectures in the FAT file:/users/***/desktop/thirdparty/framework/release/thirdpartyapi are:armv7 armv7s i386 x86_ Arm64

Next we replace the merged thirdpartyapi with any. thirdpartyapi file under the framework, which is what we ultimately need. framework files, it's easy.

Methods for merging the. Framework or (Static library. A) files of third-party real machines and emulators

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.