Take the 2-minute tour ×

I'm working on a project that generates a iOS static library, and some sample code describing how to use the library... The code for the library will not be made public, but the sample code obviously will be. I also use the sample code as a simple test harness for the library, so during dev, I point it directly to the private source files, and test w/o the library dependency. The trouble is, I then have to manually make changes to the sample code project to get it ready for general consumption. I would like an easy way to test changes to the library while in dev mode, then build and package the library along with the sample code (now pointing to an actual .a file + headers) into a releasable file hierarchy. I know how to build everything in manual steps, my question is more to the point of how you set up your folder/project structure, as well as how to set up any build scripts to make the whole process automatic. I am using Xcode v4.3.2


share|improve this question

1 Answer 1

up vote 2 down vote accepted

You should setup a project that just builds your static library. It should be the only thing that contains the source for the library. Then you could have a separate project that imports that static library as well as the sample code in order to test it. You shouldn't have to ever point your test application directly at the source. It is best to develop your library from the perspective of people who will be using it (only having access to the public headers and the static library).

share|improve this answer

Your Answer


