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