eval(art);

Creating Static Libraries for iPhone/iPod Touch

by Philippe Hausler on Aug.29, 2008, under iPhone/iPod Touch

With the popularity of the iPhone rising and the base iPhone SDK lacking in certain commonly used APIs it becomes apparent to me that the need for a good tutorial on home-brew static libraries is needed. This might pose as a daunting task since there is no base project template for this type of target.To create a static lib you must first create a new empty project.

newproject.png

Next you need to add a new target for you project so that the source can compile to a lib.

addtarget.png

Next you need to change the Base SDK from Current Mac OS to Device - iPhone OS 2.0

basesdk.png

This will now allow you to compile a static library for device target applications. One major caveat: The application will only run on the device and NOT run in the simulator when the static library is used. If it is desired to run the application in the simulator, you must link the application against a static library compiled as a target to Mac OS X.

This target method does need to be refined; currently the library is static and cannot be directly compiled as a framework. Hybrid targets still need to be implemented for being able to run as both simulator and device like the Apple frameworks. When I finish the compile templates for frameworks for iPhone/iPod Touch I will post them here.


Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...