Native IPhone development using XCode, at last!

26 09 2007

So I got this fancy IPhone last week some time and have since been trying to get myself setup so I can start playing with native app development. The iphone dev. team has been making great strides but up until fairly recently, installing the toolchain has been rather daunting.

To keep this short and sweet, here are the steps I followed to get a working toolchain and XCode template:

1) Download the toolchain installer.

2) Download the toolchain helper. You’ll need an iphone connected. This little guy copies the essential files from your iphone onto your mac.

3) Run the toolchain helper. You’re phone will have to be ‘jailbroke’ for it to work. The simple answer, install AppTapp.

4) Run the toolchain installer.

5) Grab the XCode template. You’ll need to make a few changes to the template to work with your toolchain install.

5a) Open the xcode template project file in Xcode. The first thing you’ll see is that it can’t find Foundation.framework and UIKit.framework. You can fix these by right clicking them and choosing “Get Info”. Browse to your toolchain install and find the frameworks. For example, Foundation.framework is in “/usr/local/arm-darwin-apple/heavenly/System/Library/Frameworks”.

5b) Open Info.plist. Change the value of “CFBundleExecutable” to “¬ęPROJECTNAME¬Ľ”. Save.

6) Take a look at this thread and follow the directions provided by ‘rogerboesch’.

7) Grab Lucas Newman’s examples, unzip, open in XCode and build. SHAZAAM! If you want to test your app on the iphone, the easiest way I’ve found is to use AppTapp to install OpenSSH and then connect to the phone via ftp. Simply copy your app into Applications.

Hopefully it helps someone else! Big thanks to Lucas Newman and Roger Boesch. If you get stuck, leave a comment and I’ll do what I can to help.