Using the iPhoneOS SDK on older PPC Macs
I'm just getting started with developing applications for the iPhone / iPod Touch, and one of the first real hurdles I encountered was that Apple didn't make it easy by default to use their iPhoneOS SDK on non-Intel Macs. With some Googling around I was was able to find a variety of articles that mentioned workarounds, but the comprehensive solution was spread across lots of blog post comments, forum postings, etc. So, for my own reference and hopefully as assistance to anyone else who might be in the same boat, I'm consolidating the steps here.
I'm using a 1.5GHz Powerbook G4, which uses the PowerPC (PPC) architecture. I downloaded version 2.2 of the iPhoneOS SDK, build 9m2621-final.
After the regular installation of the iPhoneOS SDK (which is really just the regular Xcode install with some additional packages thrown in) was complete, the Xcode new project menu was notably missing the option to choose the iPhone platform. On the advice of this 3by9 article, I took these steps:
- Mount the SDK installer disk image
- Open the packages folder
- One at a time, install all of the .pkg files that begin with "iPhone", using the default install destination
- When done, you'll have a "Platforms" directory in the root level of your Mac's hard drive. Move the contents of that directory into the
/Developer/Platforms/directory. If you're like me, when you're done, you'll have three directories in/Developer/Platforms: "iPhoneOS.platform", "iPhoneSimulator.platform" and "MacOSX.platform".
Once that step is done, you'll be able to launch Xcode and create new projects that use the iPhoneOS platform and application types. But, you still won't be able to build or run those applications, because Apple has hardcoded the "i386" (Intel) architecture as the only valid one to compile for. Thanks to a variety of comments on the above 3by9 post and comments 23-25 on this TUAW article, here are the remaining steps to address that:
- Close Xcode and edit this file (perhaps after making a backup):
/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Specifications/iPhone Simulator Architectures.xcspec - Change line 12 to read
Name = "Standard (iPhone Simulator: i386 ppc)"; - Change line 16 to read
RealArchitectures = ( i386, ppc ); - Add this chunk before the last closing parentheses:
// PowerPC { Type = Architecture; Identifier = ppc; Name = "PowerPC"; Description = "32-bit PowerPC"; PerArchBuildSettingName = "PowerPC"; ByteOrder = big; ListInEnum = NO; SortNumber = 106; }, - Save the file and close it. Now relaunch Xcode.
- With Xcode open and your project loaded, right click on the project name under the "Groups & Files", and select "Get Info"
- Under the "Build" tab and in the "Architectures" menu, change these options:
SetArchitecturesto "Native Architecture of Build Machine"
SetBase SDKto "Simulator - iPhoneOS 2.2"
LeaveBuild Active Architecture Onlychecked
EditValid Architecturesto be not only include armv6, but also "ppc" and "i386".
(I think some of these may be redundant, but it's the combination that's working for me.)
When you next build your project, you shouldn't get any errors about VALID_ARCHS.
I hope that's helpful. Since this is only one particular combination of build hardware/architecture and SDK software version, I'm sure there are other combinations out there where the above may not work, your mileage may vary.
Now, back to working on building an actual application...
Have something to say about that? Read and add comments below.
Related Posts
If you thought that was interesting, you might also enjoy these related posts:


So how well is it working for you on PPC? Which version of OS X? I am getting the new OS X bundle at the end of the month, and I am running PPC, and I would like to port some of my games over to the iphone/ipod touch.... Let me know how well it works and if you can get the applications to run sucessfully on the iphone/ipod touch. Cheers!