iOS static libraries without using header files

We use static libraries in our  IOS Project.  To use the Static library,

    1.  Header files should be added in the project which uses it and
    2. 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

Method 1:

/Source/iphoneapp/libs”  in User  Header Search Paths and Check

Recursive Check box

Method 2:

eg.) Connection header files  are under

“/Source/iphoneapp/libs/Connection/Connection”,

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

“/Source/iphoneapp/libs/SocialNetwork/SocialNetwork”

The following should be added in “User Header Search Pathswithout

checking the recursive check box.

/Source/iphoneapp/libs/Connection/Connection

/Source/iphoneapp/libs/Utils/Utils

/Source/iphoneapp/libs/Themes/Themes

/Source/iphoneapp/libs/SocialNetwork/SocialNetwork

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

About these ads

4 thoughts on “iOS static libraries without using header files

  1. Pingback: Using iOS Static Libraries without adding .a Files

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s