Tuesday, July 22, 2008

iPhone SDK installtion on PowerPC G4 Mac Mini (Non Intel Mac)

These are contents from different blogs,sites and forums combined together for a successful installation of iPhone SDK on PowerPC G4 which I've used to install iPhone SDK.

I managed to install the SDK completely (in the right place) without using Pacifist, fully working on a Mac Mini PowerPC G4 32 Bit. My root partition is still spammed with 5 gb of redundant crap for following this "Tip", but thats why i decided to let others know there's another better way of getting it to work:

Pre Installation Steps( Create Installation Package for PowerPC G4)

1. Make the iPhone SDK.dmg read/write-able with Disk Utility using convert -> to read/write.
2. Mount the R/W dmg.
3. You need to delete some unneccessary file so that you can modify the installer config file, because the image is completely full. I choose the PDF in the root of the dmg.
4. Modify iPhone SDK/iPhone SDK.mpkg/Contents/iPhoneSDK.dist :(Right Click on "iPhone SDK.mpkg" from the Mounted disk ans Selelct "Show Package Contents"

Once we Select this menu, We will get a list of files . From this list ,Select iPhoneSDK.dist and edit with any text editor and you have to edit three functions from this file as follows..

- Goto Line number 70 and

function agreedToSLA()
var res = system.run("tempfileexists", "insttmp_37253734");
if( res == 0 ){ return true; }
my.choice.tooltip = system.localizedStringWithFormat('TT_NOIPHONESDK');
return true; // By default it is false

function SDKPresent()
var res = system.run("tempfileexists", "insttmp_37253735");
if( res == 0 ){ return true; }
system.log("To install the iPhone SDK you need to agree to the iPhone SDK License agreement through the GUI interface.");
return true; // By default it is false


function isIntel()
var res = (system.sysctl('hw.byteorder') == '4321');
// by default is 1234 change this to 4321

if( !res ){ my.choice.tooltip = system.localizedStringWithFormat('TT_NOINTEL'); }
return res;

/// End of File
Note :
- Line 71 ( in function agreedToSLA() ) - modify "return false;" to "return true;"
- Line 81 ( in function SDKPresent() ) - modify "return false;" to "return true;"
-Line 103 (in function isIntel() change var res = (system.sysctl('hw.byteorder') == '1234'); to var res = (system.sysctl('hw.byteorder') == '4321');

Save this File, Now we are ready for installation

Once we completed this step, we can directly install IPhone SDK into Power PC . From the Installation Screen do not select Mac OS X 10.3.9 Support and Web Objects (
Web Objects is Optional if you want you can select)

Post Installation Steps

1. Once we completed the installation we have to replace a configuration file, which is used to identify the Architecture ( Make sure backup of original) as follows

Once you've moved the iPhone platform directories to their appropriate location under /Developer/Platforms, drill into: /Developer/Platforms/iPhoneSimulator.platform/Developer/

In this directory, you will find a file called "iPhone Simulator Architectures.xcspec" Make a backup of it and open the original in your favorite editor

Replace the file contents of "iPhone Simulator Architectures.xcspec" with the following line

// 32-Bit
{ Type = Architecture;
Identifier = Standard;
Name = "Standard (iPhone Simulator: i386)";
Description = "32-bit iPhone Simulator architectures";
ListInEnum = YES;
SortNumber = 1;
RealArchitectures = ( i386, ppc7400 );
ArchitectureSetting = "ARCHS_STANDARD_32_BIT";

// 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;

Location of Configuration File
iPhone Simulator Architectures.xcspec

Xcode Location after iPhone SDK installation