No more nonsense, just on the back of the operating principle.
In peacetime development, several companies may cooperate in a project, but do not want to let another company see their source code, how to do. At this point we can make our own static library.
How to make. A
New project: Select cocoa Touch Static Library
Add the source code you need to make a static library to the project
Select the. h file you want to expose.
Click on the "+"->new headers on the left of build phases. Drag the. h file you want to open into public
Editing the edit scheme, choosing whether to release or debug
Then select the real machine or simulator
Command + B Compilation
Libprojectname.a Right-click Show in Finder appears after compiling
You'll see in the table of contents
I've compiled all four of them once. There are simulators and real machines.
$ lipo-info Libfdhandwrite.a
Architectures in the Fat File:libfdhandwrite.a are:armv7 arm64
In the terminal you can see ARMV7 arm64 that this is a real machine compiled.
$ lipo-info Libfdhandwrite.a
Architectures in the Fat File:libfdhandwrite.a are:i386 x86_64
You can see that the real machine and the simulator are obviously different.
To be able to use both the real machine and the simulator, merge the two. a Files
$ lipo-create release-iphoneos/libfdhandwrite.a release-iphonesimulator/libfdhandwrite.a-output LibHandWrite_ Common.a
The merged. A file can be easily used in other projects. Remember to drag it in together with some. h files.
Complementary principle:
Note: If a schema error i386 or x86_64 is found after compiling
A similar workaround is as follows:
Remember, merge.
Making the iOS Static library