1. Find the Static library project
2. Create a static library project with a. h and. m file
3. Write your method in the. h and. m files
4. Select the Command+b and emulator to find the location in the folder
The. A file of the simulator and the real machine is then generated.
5. Check whether the. A file is a real machine or an emulator (this step is not possible)
6. The merge. A file allows it to run on both the emulator and the real machine, but the file will become larger, depending on the situation, input terminal merge code,-output is the address of the output
If unsuccessful, return to the project Command+b,command+shift+b more than a few times to merge!!!! Test, sometimes not successful
7. Pack the files you want, including. A files and header files, import the works to be used, just like with a third party. We're going to test it with a project.
8. Introduction of header file output
#import "Staticlibtest.h"
End
iOS static library (. a files)