I created a static library in XCode 4.3.3 and am going to share it with my friends.
So should I just give them the libMyLibrary.a file or anything else?
I also noticed that when I use my static library in my own projects, I have to specify the user header path to point to the source folder of my library project.
So should I also give them the .h files?
Thanks
The bare minimum you need to give is the binary (
libSomeLibrary.a) and all the ‘public’ header files. You decide which headers are public and which are private, in order to use your classes and functions they will need these headers to include into their code.They will need to add the
.afile and all the.hfiles to their project, and also they will need to know what frameworks your library uses so that they can link those.There’s a neat feature in Xcode where you can add another project to your project and set it as a dependency. Your outer project will then build the inner one first and link to it. If you want to share the full code then I recommend this approach.