Transfer from http://blog.csdn.net/jinglijun/article/details/8276089
There are usually two versions of the static library used in the project, one for the simulator and one for the real machine, because the Mac and IPhone have different CPUs.
For the convenience of switching between the simulator and the real machine, it is necessary to make a generic version.
There are now two versions of the static library libsqlite_i386.a(simulator) with LIBSQLITE_ARM.A(real machine).
1. Open the terminal and enter the directory where the two files are located;
2, execution: lipo-create libsqlite_i386.a libsqlite_arm.a-output libsqlite.a, then the file will be more than Libsqlite.a, this file is a general static library.
We can lipo-info the LIBSQLITE.A command to see if it is generic.
It can be found that the size of the LIBSQLITE.A is libsqlite_i386.a and libsqlite_arm.a, and it is recommended to replace the static library with the real machine version when publishing.
ThatWhat the hell is Lipo?
from Mac system to make compatible Powerpc platform program.
Lipo is a tool that handles generic programs (Universal Binaries) in Mac OS x. Many (almost all) programs that are now on sale or available for download are marked with "Universal", meaning they both have code that PowerPC and Intel chips can handle. But since you probably don't care about one of them, you can use Lipo to "Slim Down" your program . For example, you want the notes application to contain only Intel (i386) code:
Cd/applications
Lipo Stickies.app/contents/macos/stickies-thin I386-output stickies.app/contents/macos/stickies.i386
CD stickies.app/contents/macos/
RM stickies
MV Stickies.i386 Stickies
[Go] iOS development use Lipo command to make simulator and real machine General Static library