2. In the project that need to use the above created static library, add the static library project file (eg. MyStaticLib.xcodeproj file) by using the Add File to "MyProject" ... menu. Make sure to choose the following option:
- Uncheck the Destination - Copy files into destination folder (if neccessary) option. This will ensure that the physical files in the static library project is not copied and only the reference to the static library project is created.
- Select the create group for any added folders option under the Folder selection. **create folder references for any added folders option seem to work as well.
3. Add the static library project into the target dependencies section of the project.
Also add the static library archeive file (eg. libXXX.a) into the Link binary with library section. Make sure that all the iPhone framework (eg. AVFoundation) that is needed by the static library's codes are added to the Link binary with library section as well.
4. The header file for the static library project can be added to the source code in the target project by either of the following way:
- Use of absolute path to the static library project (eg. import "/user/admin/XXX/xxx.h").
- Use of relative path to the static library project (eg. import "xxx.h"), but make sure that the absolute path to the static library include files are added to the User header search paths section for the target project's build setting tag under search path section.