Static Library
. A-Static library-"compile-time connected libraries, compile the code when the library's binary import compiled into the program
. dylib-"Dynamic Library-" When you run the program, the call to the relevant function will be connected to the dynamic library,
. framework-can be either a static library or a dynamic
1. Function of the library-"1. Non-burst source code (for a lot of source code package into binary) 2. Simple to use, only need to import libraries and header files to use
2. How to Make
3. How to use
Package Some implementation code that you don't want to expose to the consumer. A library (for example: Baidu Map SDK, when writing the SDK, need to use)
Need to create a static library project to implement the code logic and complete the packaging of the code (. a library)
Create a test project (using. a library) (import the. A library and the necessary header files into the test project)
Static library packaging (1, based on the simulator-generated. A library, this. A library is a computer-based CPU (i386) logic generated and cannot be used on a real machine
2, based on the real machine generated. A library (ARMV6,ARMV7 smartphone CPU logic) cannot be used in an emulator environment)
Synthesize two static libraries into one
Must write out the absolute path of two static libraries
Lipo-create/ospath/libname.a/simulatorpath/libname.a-output/allinonelibname.a
In the terminal input
Merge. A
lipo-create/users/lzxuan/desktop/libmycontrol.a/users/lzxuan/desktop/mycontrol/libmycontrol.a-output/users/ Lzxuan/libmycontrol.a
-output the path of the target file appended to
=================
Merging Xxx.framework
1. First copy the generated myframework.framework to the desktop
2. Enter the following instruction
The path behind the-create should be the path of the myframework.framework/myframework in the real machine and the emulator myframework.framework/myframework path
-output is behind the target just now on the desktop myframework.framework/myframework
lipo-create/users/lzxuan/desktop/debug-iphoneos/myframework.framework/myframework/users/lzxuan/desktop/ Debug-iphonesimulator/myframework.framework/myframework-output ~/desktop/myframework.framework/myframework
Static libraries and dynamic libraries