iPhone Development Environment on PPC

I'm not exactly fond of iPhone or Apple in general. I think their hardware is way overpriced, their user and developer policies are screwed and their lemming like followers need to get to grips with simple concepts as critical thinking and stop evangelizing everything Apple makes as the best thing since the sliced bread.

That said, I have a project to make on iPhone. And here is how to set up your development environment on an old G4 PPC Mac Mini...

You absolutely have to install Mac OS X 10.5.x - Leopard. It's the latest OS which will install on PPC. This is needed to install XCode 3.1 with an updated Objective-C 2.0 which is needed for iPhone development.

Next you need to get the latest XCode (3.1.4) and iPhone SDK (3.1.3) that will run on Leopard. This are available in a single 3GB dmg package from apple at: iphone_sdk_3.1.3_with_xcode_3.1.4__leopard__9m2809a (You'll need to log in with your free Apple Developer account first!)

Next comes the installation. Apple claims that you can't develop iPhone applications on PPC based macs, but that, as many things, is just another lie to force you into buying yet another mac.

Install the XCode as usual. Notice that iPhone packages in the install process will be grayed out, but we'll fix this later.

After you have installed XCode, go to the mounted image, and enter the Package directory. Manually install iPhone* packages + DeveloperDiskImage.pkg.

Next you need to fix iPhone SDK to coerce it into working on PPC. Copy or better yet make symbolic links of folders /Platforms/iPhoneOS.platform and /Platforms/iPhoneSimulator.platform into /Developer/Platforms.

The last step is to change contents of the file /Developer/Platforms/iPhoneSimulator.platform/Developer/
Library/Xcode/Specifications/iPhone Simulator Architectures.xcspec
. Here is the new contents of the files with added changes in bold (beyond G3, G4 and G5 stances notice addition of ppc on line near the top RealArchitectures = ( i386, ppc );/** iPhone Simulator Architectures.xcspec Copyright (c) 2008-9 Apple Inc. All rights reserved. Architecture specifications in the iPhone Simulator platform. */ ( // 32-Bit { Type = Architecture; Identifier = Standard; Name = "Standard"; Description = "32-bit iPhone Simulator architectures"; ListInEnum = YES; SortNumber = 1; RealArchitectures = ( i386, ppc ); ArchitectureSetting = "ARCHS_STANDARD_32_BIT"; }, { Type = Architecture; Identifier = PlatformStandardUniversal; Name = "Optimized"; Description = "All iPhone Simulator architectures"; ListInEnum = YES; SortNumber = 3; RealArchitectures = ( i386 ); ArchitectureSetting = "ARCHS_UNIVERSAL_IPHONE_OS"; }, // Old-style Debug { Type = Architecture; Identifier = Native; Name = "Native Architecture of Build Machine"; Description = "32-bit for build machine"; ListInEnum = YES; SortNumber = 101; ArchitectureSetting = "NATIVE_ARCH"; }, // G3 { Type = Architecture;Identifier = ppc; Name = "Minimal (32-bit PowerPC only)"; Description = "32-bit PowerPC "; PerArchBuildSettingName = "PowerPC"; ByteOrder = big; ListInEnum = No; SortNumber = 201; }, // G4 { Type = Architecture; Identifier = ppc7400; Name = "PowerPC G4"; Description = "32-bit PowerPC for G4 processor"; ByteOrder = big; ListInEnum = NO; SortNumber = 202; }, // G5 32-bit { Type = Architecture; Identifier = ppc970; Name = "PowerPC G5 32-bit"; Description = "32-bit PowerPC for G5 processor"; ByteOrder = big; ListInEnum = NO; SortNumber = 203; }, // Intel { Type = Architecture; Identifier = i386; Name = "Intel"; Description = "32-bit Intel"; PerArchBuildSettingName = "Intel"; ByteOrder = little; ListInEnum = NO; SortNumber = 105; }, )

With that procedure done, you now have iPhone development working on PPC...

N:: on 12/23/2010