1. Create a new framework&library Library. Cocoa Touch Static library under IOS . Then enter product name as Libsql
2, the libsql.h and libsql.m deleted. Import Ocsqlite.h and ocsqlite.c
3, modify scheme, set to release version
4.
Select iOS device to compile and run. After success, a LIBLIBSQL.A file is generated under the build/products/release-iphoneos/of the directory. Note that this produces the. a file used by the real machine.
Select Iphonesimulator to compile once, and also generate a LIBLIBSQL.A file under build/products/release-iphonesimulator/. is the. A file used by the virtual machine.
Take a look at the differences between these two files, using the Lipo-info command. Open terminal.
into the appropriate directory. Enter the appropriate directory.
Real-Machine: LIBLIBSQL.A file information.
Input file Liblibsql.a is not a FAT file
Non-fat FILE:LIBLIBSQL.A is architecture:armv7
Emulator's: LIBLIBSQL.A file information.
Input file Liblibsql.a is not a FAT file
Non-fat FILE:LIBLIBSQL.A is architecture:i386
If you use a real machine and a simulator, you need to merge the two files and use the command lipocreate XXXX/LIBLIBSQL.A xxxxx/liblibsql.a-output LIBSQL.A
You can also use Lipo-info to view the merged LIBSQL.A
You can see the architectures in the Fat FILE:LIBSQL.A are:i386 armv7
OK, Cheers, package complete.
IOS packaging. A Files