Friday, April 18, 2008

Using the Apple SDK with low-level toolchain APIs

Update and details here

Assume you have installed iPhone SDK beta 3 and want to use the toolchain APIs to port the existing iPhone Application to Firmware 2.0 beta 3 using Apple's SDK

(1) Install iPhone SDK beta 3 from Apple

(2) Install the toolchain headers as per instructions from here
But I have modified it for the Beta 3 SDK path as below


$ sudo mkdir -p /Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS2.0.sdk/
$ svn co http://iphone-dev.googlecode.com/svn/branches/include-1.2-sdk
$ cd include-1.2-sdk
$ ./configure --prefix=/Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS2.0.sdk/
$ sudo sh install-headers.sh


(3) Get the following Template here, unzip it and put the "Tool Chain Build" folder under the following folder (you need to create this folder first),
/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Project Templates/iPhone Tool Chain

then you can see this Template when you create new project

(4) This template supports Build to device and release only, so you have to connect your iPhone to USB cable when build and go

(5) When using SDK framework to build old iPhone App, you would discover that some symbols will be missing when linking

(6) The Template also include MakeFile to build application that can be ssh to iPhone folder /Application

No comments: