Getting Started with iPhone Development
Geek Alert!
In my spare time I've been playing around with the iPhone SDK (Software Development Kit). I encountered a few issues which I will describe here.
You Need a Mac
To develop for the iPhone and iPod Touch you need a Mac running Leopard (10.5). Earlier versions of the Mac OS won't do. Bundled with Leopard is a free IDE called Xcode. Once you have Xcode up and running, you need to go to http://developer.apple.com/iphone/, create a login, and download the iPhone SDK on to your Mac.
Objective-C
Some of you may freak out at this point at the thought of learning another programming language. The de facto standard for programming for the iPhone is Objective-C. You can also do some coding in C++. But most everyone is working in Objective-C. The Apple site has tutorials on iPhone development and there are tutorials out there on Objective-C. So I'm not going to repeat that stuff here.
Simulation is Free, Distribution is $99
You can build your application on the Mac using Xcode and run it in an iPhone simulator for free. But if you actually want to try your code on your iPhone or iPod Touch, you are going to have to plunk down $99 and join the iPhone Developer Program (or more if you are part of a larger enterprise).
Once signed up you will find that when you login to http://developer.apple.com/iphone/ you have a new button that leads to the iPhone Developer Program Portal. This is where you go to manage certificates that you will need to develop for the device. The steps are laid out for the most part. So again I'm not going to repeat instructions that are available online. But I did run into a few issues that I will document here.
Issue #1: Unable to locate a suitable developer disk image
I own the latest iPod Touch that comes with 2.1.1 installed. When I tried to create my app in Xcode I got an error dialog that said "Unable to locate a suitable developer disk image." I found a solution to my problem here. To quote from the thread:
You will need to create the following symlink:
.../iPhoneOS.platform/DeviceSupport/2.1.1/
pointing at:
.../iPhoneOS.platform/DeviceSupport/2.1/
To do that, open up a terminal window (command prompt) and enter the following:
cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport
ln -s 2.1/ 2.1.1
Issue #2: Signing Your Name
Once you have access to the developer portal you will find instructions under the Provision / How To section that tell you to do this:
In the Project Info window select the ‘Build’ tab and enter “iPhone Developer: YourFirstName YourLastName” in the ‘Code Signing Identity’->’Any iPhone OS’ field setting. This is also the Common Name of your iPhone Development Certificate. (Note: Be sure to include the space between the ‘:’ and ‘YourFirstName’.)
So reading that, I entered "iPhone Developer: Mitch Allen" - it didn't work. Why? Because when I signed up for the developer program I used my full name so it would match my credit card. What I needed to do was set this to "iPhone Developer: Mitchell Allen."
Issue #3: Error 0xE800003A
When trying to load and run the application on the actual device you get this rather cryptic error: "Your mobile device has encountered an unexpected error (0xE800003A) during the install phase."
The closest thing I found to a solution was here.
The instructions for creating certificates for your application tell you to create an identifier like this: com.yourcompany.yourapp. I was experimenting by creating an app based on Conways Game of Life. So my identifier was "com.mitchallen.life2." To make the dreaded error code go away I almost followed the instructions in the thread. What I did was edit the Bundle Identifier in info.plist to be:
com.mitchallen.${PRODUCT_NAME:Identifier}
I hope this helps!
You may also want to read this article: The iPhone Development Story.
Where's the Video?
Since it's my first attempt, the app isn't much to look at.
In my spare time I've been playing around with the iPhone SDK (Software Development Kit). I encountered a few issues which I will describe here.
You Need a Mac
To develop for the iPhone and iPod Touch you need a Mac running Leopard (10.5). Earlier versions of the Mac OS won't do. Bundled with Leopard is a free IDE called Xcode. Once you have Xcode up and running, you need to go to http://developer.apple.com/iphone/, create a login, and download the iPhone SDK on to your Mac.
Objective-C
Some of you may freak out at this point at the thought of learning another programming language. The de facto standard for programming for the iPhone is Objective-C. You can also do some coding in C++. But most everyone is working in Objective-C. The Apple site has tutorials on iPhone development and there are tutorials out there on Objective-C. So I'm not going to repeat that stuff here.
Simulation is Free, Distribution is $99
You can build your application on the Mac using Xcode and run it in an iPhone simulator for free. But if you actually want to try your code on your iPhone or iPod Touch, you are going to have to plunk down $99 and join the iPhone Developer Program (or more if you are part of a larger enterprise).
Once signed up you will find that when you login to http://developer.apple.com/iphone/ you have a new button that leads to the iPhone Developer Program Portal. This is where you go to manage certificates that you will need to develop for the device. The steps are laid out for the most part. So again I'm not going to repeat instructions that are available online. But I did run into a few issues that I will document here.
Issue #1: Unable to locate a suitable developer disk image
I own the latest iPod Touch that comes with 2.1.1 installed. When I tried to create my app in Xcode I got an error dialog that said "Unable to locate a suitable developer disk image." I found a solution to my problem here. To quote from the thread:
You will need to create the following symlink:
.../iPhoneOS.platform/DeviceSupport/2.1.1/
pointing at:
.../iPhoneOS.platform/DeviceSupport/2.1/
To do that, open up a terminal window (command prompt) and enter the following:
cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport
ln -s 2.1/ 2.1.1
Issue #2: Signing Your Name
Once you have access to the developer portal you will find instructions under the Provision / How To section that tell you to do this:
In the Project Info window select the ‘Build’ tab and enter “iPhone Developer: YourFirstName YourLastName” in the ‘Code Signing Identity’->’Any iPhone OS’ field setting. This is also the Common Name of your iPhone Development Certificate. (Note: Be sure to include the space between the ‘:’ and ‘YourFirstName’.)
So reading that, I entered "iPhone Developer: Mitch Allen" - it didn't work. Why? Because when I signed up for the developer program I used my full name so it would match my credit card. What I needed to do was set this to "iPhone Developer: Mitchell Allen."
Issue #3: Error 0xE800003A
When trying to load and run the application on the actual device you get this rather cryptic error: "Your mobile device has encountered an unexpected error (0xE800003A) during the install phase."
The closest thing I found to a solution was here.
The instructions for creating certificates for your application tell you to create an identifier like this: com.yourcompany.yourapp. I was experimenting by creating an app based on Conways Game of Life. So my identifier was "com.mitchallen.life2." To make the dreaded error code go away I almost followed the instructions in the thread. What I did was edit the Bundle Identifier in info.plist to be:
com.mitchallen.${PRODUCT_NAME:Identifier}
I hope this helps!
You may also want to read this article: The iPhone Development Story.
Where's the Video?
Since it's my first attempt, the app isn't much to look at.
Labels: geek iphone

0 Comments:
Post a Comment
<< Home