We use static libraries in our IOS Project. To use the Static library,
- Header files should be added in the project which uses it and
- binary version (.a file) should be added into the project.
Whenever there is a new addition of file(s) in static library, that header files need to be added in all the projects which are using the static library
We have more than eighty applications which uses our own static library.
Whenever I write a new file in the static library, I need to add that header file as reference to our eighty apps. Each application has to be checked out from sub version, then header files have to be added and has to commit the modifications. There won’t be a worst punishment for a developer than following the above process.
Finally I figured out a solution
This can be implemented in your project which uses static library to
eliminate the process of adding header files in all the projects.
Select Target->Build Settings
1. Set Always Search User Paths to YES
2. Set the Absolute Path of the library in User Header Search Paths and Check Recursive check box.
For eg: We have the following static libraries under “/Source/iphoneapp/libs”
Connection, Utils, Themes and SocialNetwork
I have two methods to resolve this
“/Source/iphoneapp/libs” in User Header Search Paths and Check
Recursive Check box
eg.) Connection header files are under
Utils header files are under “/Source/iphoneapp/libs/Utils/Utils”
Themes header files are under “/Source/iphoneapp/libs/Themes/Themes” and
SocialNetwork header files are under
The following should be added in “User Header Search Paths” without
checking the recursive check box.
Some times, one static library needs to be used by some other static
library, where these methods can be used.
I hope this will be very useful for developers who are following trunk,
branches and tags subversion process.
Note: Value of User Header Search Paths should not contain any blank spaces