Roll-your-own iPhone framework

roll_iPhone_frameworkimgAfter starting work on my latest iPhone app (#6 or so), I finally decided it was time to get more efficient with my existing library of code. I’ve been building various helper classes for manipulating bitmaps, etc, and I wanted to be able to share them between my apps in a more organized way.

As usual, there isn’t much on the web about this, but I eventually tracked down a couple of useful articles to get me started:

keremk’s iphone-static-library-project-template
Building static libraries with the iPhone SDK

The first article shows you how to add your own custom project type template to XCode so you can easily create shared iPhone libraries. The second one shows you how to reference your new library from your application. With a little trial-and-error I now have a nice shared lib of iPhone classes. Pretty soon, who knows, maybe Apple will allow dynamic linking and we can move iPhone development into the 80s!

Leave a Reply

Your email address will not be published. Required fields are marked *