The general static library supports a variety of CPU architectures for real and emulator, such as armv6, ARMV7, ARMV7s, ARM64, I386, x86_64.

  1. View static library information

Use the following command to view information about the schema that the current static library contains.

lipo -info ./xxx.a
Copy the code
  1. Split static library

Use the following command to separate the ARM64 architecture in XXx. a into the new xxX_arm64.a static library (which contains only the ARM64 architecture).

lipo ./xxx.a -thin arm64 -output xxx_arm64.a
Copy the code
  1. Merge static libraries

Use the following command to merge xxx_armv7.a and xxx_arm64.a into a new static library new.a.

lipo -create xxx_armv7.a xxx_arm64.a -output new.a
Copy the code