Recently studied the package Lib, I experimented with 3 ways
The first way.
New Project-> IOS library->cocoa Touch Static Library This creates a new project for static libraries, placing the. m,.h you want to package into Lib, under the class directory, and then build. It's debug,release to be clear when packing.
The second way
1. Right-click on the targets of the project. ADD-> New target-> Static Library For example, we built a example target.
2. Put the m.h you want to pack into your new folder. Select one of the. m.h, then right-click Get info,taggets. Choose example, your own target is linked to these files.
3. In the project default target double-click, open general, in direct dependencies inside add example, so that the program in the compilation will generate this library, build, in the products inside will generate a. App, A file at the end of a lib. A is what you want.
The Third Way
1. As in the first way, we call a project
2. Project A to B. In the pop-up box, select Releate to project, so that A and B works on the link, in the B project targets double-click, open general, in direct dependencies, add a project target So that B will go to Builda when it is built, so that it is generated in a. A.
To sum up, feel the third way is the best. Inside B is the source of the test environment, in a inside is to package the Lib project. Side write code, side package lib, very good yes ...