I have a couple of static phone / iPad libraries I'm working on. The problem I want to advise is the best way to package libraries. My goal is to simplify the use of libraries in other projects and include the correct one in the assembly with minimal problems.
To make it more interesting, I am currently creating 4 versions of each library as follows
- armv6 / armv7 release (devices)
- i386 release (simulator)
- armv6 / armv7 debug (devices)
- i386 debug (simulator)
The difference between release and debug versions is that debug versions contain a lot of NSLog code (...), which allows people to see what is going on inside as a help for debugging.
Currently, when I build all the projects, I organize the libraries into two directories, for example:
release
lib-device.a
lib-simulator.a
debug
lib-device.a
lib-simulator.a
This works fine, except that when included in projects, both paths are added to the library search path, and switching the target from one to the other is a pain. Or, as an alternative, I get two goals.
An alternative that I think of is changing directories as follows:
release
device
lib.a
simulator
lib.a
debug
device
lib.a
simulator
lib.a
When playing with Xcode, it appears that all xcode uses the lbrary project links for - this is to get the library file name, which it then looks for in the library paths. Thus, by parameterizing the library path with the current constructed type and target device, I can automatically switch automatically.
What do you guys think? Is there a better way to do this?
Ciao Derek