IPhone SDK on G5 PPC

Friday, October 17th, 2008 | iPhone

<!–adsense#Google Adsense-Banner–>Officially the iPhone SDK requires an Intel Mac with OSX 10.5. Since I have a four year old dual G5, which is still running like a young dear, I don’t want to buy a new Mac just for writing iPhone Applications.

After some research, I found out, that it’s possible to make it work on PPC since the iPhone SDK are universal binaries.

To share my knowledge, I write a small tutorial. Note, that I don’t take responsibility, for any defects cause somebody used my code!

How to get the iPhone SDK to work on PPC Macs

Most of the tutorials I found in the Web are not up to date, because there where no “Aspen” packages anymore. With the iPhone SDK for IPhone OS 2.1 (build 9M2517) you can follow these steps:
1. Download the official iPhone SDK here.

2. Mount the .dmg image and install the iPhone SDK (the iPhone SDK will be grayed out!).

3. After rebooting the Mac, mount the image again and go to the folder Package. Install all packages which have iphone in the name (e.g. Simulator, SDK, Documentation).

4. Go to the folder /Platforms on the local HD and copy the iPhone.platform and the iPhoneSimulator.platform folders to /Developer/Platform.
Don’t copy the whole platforms folder, Xcode will not run correctly anymore!

5. Now we come to the interesting part. Xcode has now access to the iPhone SDK, you can already create iPhone projects, but Xcode still wants to compile the sources for the Intel architecture. To change that, open the folder /Developer/Platforms/iPhoneSimulator.platform/Developer/
Library/Xcode/Specifications/
.
In this folder you will find the file iPhone Simulator Architectures.xcspec. Make a backup and open it in any text editor. The content should look something like this:

(
// 32-Bit
{ Type = Architecture;
Identifier = Standard;
Name = "Standard (iPhone Simulator: i386)";
Description = "32-bit iPhone Simulator architectures";
ListInEnum = YES;
SortNumber = 1;
RealArchitectures = ( i386);
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";
},

// Intel
{ Type = Architecture;
Identifier = i386;
Name = "Intel";
Description = "32-bit Intel";
PerArchBuildSettingName = "Intel";
ByteOrder = little;
ListInEnum = NO;
SortNumber = 105;
},
)

6. Change the line “RealArchitectures = ( i386);” to “RealArchitectures = ( i386, ppc);“.

7. Add the architecture configuration for G3, G4 an G5, the edited file should now look like this.

(
// 32-Bit
{ Type = Architecture;
Identifier = Standard;
Name = "Standard (iPhone Simulator: i386, ppc)";
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;
},
)

Now you should be able to compile the iPhone project and run the app in the iPhoneSimulator. I never tried to put an App into the AppStore, but I think it should work.

Please let me know if my post could help you, or if you have any questions!

Further links to this issue:
http://linuxclub.blogspot.com/2008/07/iphone-sdk-installtion-on-powerpc-g4.html
- http://forums.ilounge.com/showthread.php?t=223546
- http://www.iphoneatlas.com/2008/03/10/surprise-iphone-sdk-also-works-on-powerpc-macs/

Tags: , , ,

64 Comments to IPhone SDK on G5 PPC

Joe
October 30, 2008

Thanks for this it works a treat!

lehmamic
October 30, 2008

Your most welcome :)

lehmamic
October 30, 2008

I also tested it on my G4 PowerBook and it works, so feel free and develop a lot of good apps ;)

KatsuMooMoooo
November 5, 2008

Hello — thanks a lot for the great help! I am SO upset that Apple are being unfair to loyal PPC owners who supported them, and believed them, when they told us again and again that PPC is the future. So they change their mind, and even though PPC hardware is still kicking ass, they make us look like idiots for following them. Anyways, I am trying my hardest to get iPhone SDK running right on my dual G5/leopard — after following these instructions, I can build iPhone sample projects, and launch simulator, but when I try to run the app in the simulator it just disappears — has anyone seen that before??

KatsuMooMoooo
November 5, 2008

Actually I take that back — i tried another sample app (QuartzDemo) and this one works!! For some reason SeismicXML doesn’t, but i’ll assume this is an issue with that sample..

lehmamic
November 6, 2008

I guess Apple did not test it entirely for PPC, thats why they don’t release it for the “old” ppc architecture. Anyway, did you have any exceptions when the simulator just disappears?

I tried this tutorials http://www.iphonesdkarticles.com/2008/07/first-iphone-application.html and it works fine.

Vicarius
November 17, 2008

Thanks a lot, I just tried this on my old 12-inch PowerBook G4 and it works!

Random
December 3, 2008

Awesome.
I have been getting closer and closer to getting the SDK running, but finally found your blog, these were the instructions I needed. I now have the SDK running on a Mac Mini and when I get home I’ll try it on the ole’ G4. I am dissapointed with Apple, I know my kit isn’t state of the art anymore but it’s still perfectly serviceable. Apple already has really bad environmental credentials, now they are trying to create more electronic waste by forcing an upgrade. Sorry, rant over. Thanks for the instructions ;-)

Sohail
January 10, 2009

Awesome Work man!!! works great on G4

loboy
January 15, 2009

Radical. Thanks, worked like a charm. Just what I needed to get started.

Dan
January 19, 2009

I can’t get this to work…..
Have things changed recently?
I’m running a ppc G5 OS X (10.5.6) with iphone SDK OS 2.2.
I should say that I’m kind of an apple novice but an experienced programmer. XCode doesn’t even seem to *look* at the modifiedArchitectures.xcspec file! (I can put junk chars in there & there is no complaint)

Please help!

lehmamic
January 19, 2009

Dan, since I have been on vacation the last view weeks, I did not try the SDK 2.2 yet and unfortunately I’ll have no time until I moved to the new flat with my girlfriend until mid of february.
Did you really edited the correct Architectures.xcspec file? Since you copied these platform files, it might me that you catch the wrong one. Make sure the file is located at /Developer/Platforms/iPhoneSimulator.platform/Developer/
Library/Xcode/Specifications/ .
If you like, I can prepare my file for download, so you can be sure to have a correct modified file.
If there is any difference between 2.1/2.2 and you find out, please let me know, I’ll correct it.

Regards, Michael

p.s. it’s called Xcode not XCode ;)

Dan
January 20, 2009

lehmamic,
Thanks for getting back to me. Ever since I read that you have a girlfriend, my faith in your technical abilities is Diminishing! ;-)
As an aside… as long as we are being picky about details, I should point out that in your directions you refer to “/Developer/Platform” in step #4 when I think you mean “/Developer/Platforms”.
After posting my comment on your site, I tried another set of directions (http://www.chrishardie.com/blog/2009/01/using-the-iphoneos-sdk-on-older-ppc-macs.html#comment-87142 )

It’s similar to yours except he just says to move ALL the directories from /Platforms to the target. I reinstalled the SDK and all the packages and followed his directions and could not start Xcode (the error is “The Mac OS X platform is missing - cannot set a default platform”). Since this seems to jive with your warning, my faith in you is returning. If I move the MacOSX.Platformback to /Platforms the I *can* run xcode, but if I try and compile MoveMe (the sample project from apple), I get : No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=ppc, VALID_ARCHS=ppc970). I don’t know where it’s getting “ppc970″ from! I tried replacing all all the “ppc” in the “xcspec” file with ppc970 but… nuttin!

I think I’m losing it.

Dan
January 20, 2009

Hmmm… I see it’s getting the “ppc970″ from the project settings for “valid architectures”. I naively tried to set that to “ppc” but then the build fails because: There is no SDK with specified name or path ‘Unknown Path’

Dan
January 20, 2009

Here’s a simple question:
What should my “active sdk (In project->SetActiveSDK) be?
At the moment, all I have is Mac OSX 10.39, 10.4 & 10.5

Dan
January 20, 2009

In desperation, I tried moving the directories back to /Platforms and can now “Set the active SDK” to one of several options. I tried setting it to “Simulator - iPhone 2.2″ and got this:

Line Location MainWindow.xib:0: Description: ibtool failed with exception: IB requires the Cocoa plug-in

Needless to say, this is completely mysterious to me.
I’m going to bed.

lehmamic
January 21, 2009

Since I can not reproduce the behavior of your Xcode, it’s very difficult to help you, so I’m sorry and hope you will find a solution.

Dan
January 22, 2009

Are you familiar with the expression : “Doh!”
Thanks for your efforts… I’ll play around some more & maybe try a hackintosh maneuver on my PC.

sami
January 23, 2009

spent all night trying to get it work through many forums, finally i get it to work with this info. thanks lehmamic.

- Dan, i have the same conf as yours and followed the exact method explained and it works for me…
well, i just tried to build and run an empty iphone app. build is ok, then linkinkg ok and i have my iphone poping up with blank screen ok too…

Alessandro
January 25, 2009

Great solution, much appreciated. Thanks!

12″ iBook, 1.07 GHz PowerPC G4, OS X 10.5.6, XCode 3.1.2

Jason H.
February 10, 2009

Thanks, so much! No I just have to write a million dollar app!

Jason H.
February 10, 2009

Now

Jan Bjerck Pettersen
February 15, 2009

Thanks!
At first try, it seems to work on my iBook G4.
I choose no to be pissed because Apple don’t support us ppc guys - i love my mac to much, and I had so many worse experiences with windows. Thanks again lehmamic !

Kevin J.
February 22, 2009

Thanks A ton… this is first solution that really works, apple should take note of how many people would rather work around these issues then just bend over and take it.

Adam Crow
February 23, 2009

This was a great source of info for getting my PPC mini MAC (1GB RAM) running. I purchased Leopard and installed 10.5.5 onto it. Then following these instructions I was able to get EVERYTHING 2.2 running!!. I paid the $99 dev fee and I have been able to install my developed apps onto my iPhone and run them. I can debug them and all. The simulator works too.
Unfortunately I need to do it all again to get 2.2.1 going. So for all those wondering… IT ALL WORKS ON PPC

Luiz Fernando Tuschinski
March 1, 2009

Tanks a lot by the tutorial. My iMac is running iPhone SDK.

walt
March 27, 2009

No idea what you all did differently from me; I did exactly as posted and this doesn’t work.
I have a g4 powerbook, and i’m still getting the same error. ???

Rajesh Kumar
April 7, 2009

Works for me thanks.

Vince
April 9, 2009

Used the hack to install the latest official OS on iBook G4. Works like a charm.

Also ,thanks Adam for confirming that it also work debugging with a real device!

Ethan
April 20, 2009

I’m using sdk 2.2.1 right now. I downloaded the 3.0 beta one and it doesn’t work on powerpc.

Apparently a plugin required in interface buider is intel only, which mean I can’t open the .xib files.

On top of that, the simulator won’t work and I have no idea why…

Can anyone confirm this or tell me how they did it ?

Thanks !

Dan1
April 22, 2009

Thanks man, you rock !
Just saved me $1000
Next time I’m in CH will buy you a beer

lehmamic
April 23, 2009

@Dan1, this with the beer I have heard, I’m waiting ;)

Fish
April 30, 2009

thanks for posting this.. I am able to get it running and can test apps, but my problem is occuring when I try to port the app over to my device. I have paid for the app dev fee and worked out some code signing issues, but still cant get it to load.

The error I get is:
Your mobile device has encountered an error.
Please disconnect and reconnect the device. If this error occurs again, you may need to reinstall the Aspen SDK.

Any ideas?

C
May 1, 2009

@Fish. Cool you’ve got that far, I will be giving it a go soon.

Question: how did you “work out some code signing issues” or where (url) did you learn how to do that?

@Adam Crow, it looks like you were also able to get everything working. Any tips on code signing? Any luck with 2.2.1?

Thanks in advance. :)

C
May 1, 2009

Oh yeah, @Fish, it would be useful to include sys config so readers can compare to their sys…
~cheers!

Olivia Shaw
May 5, 2009

I downloaded the sdk and followed your instructions. I was excited when the iphone simulator appeared but immediately an error message appeared: sample has exited with status 5(sigtrap)

is this a memory issue. what is causing this problem…

thank You

Fish
May 5, 2009

sorry for the long delay on response.
I page that got me past my code signing errors I believe was this:

http://discussions.apple.com/message.jspa?messageID=7750868#7750868

Still cant get past “Your mobile device has encountered an error.” though.. so still dead in the water here. Bummer.

Fish
May 5, 2009

In CONSOLE I see the following (not sure if this is telling at all)

5/4/09 8:44:55 PM Xcode[41664] ### ERROR in ‘/SourceCache/MacOSXTouchPlatformSupport/MacOSXTouchPlatformSupport-75/RemoteIPhoneSupport/XCRemoteIPhone_MobileDeviceIO.m’ at 587 : -402653139

Jim
May 5, 2009

I bought a G5 PPC from Apple + Leopard and was really annoyed to find that the SDK only runs on an Intel mac, especially given the amount I’d spent on the iPhone + contract AND the developer license! They must think we’re all made of money, like we can just buy another computer from them when they snap their fingers.
I’ve got SDK 2 running fine, but I wonder if I install 3.0 will it work except for IB & the simulator ? I don’t need IB for my app and I don’t mind loosing the simulator.

Chris
May 18, 2009

It works fine for me. Thank you uncle.
Just another question - what does Appstore crew say? Is it legal? Has your apps ever been released?
I know that tools we use for making apps saves lots of traces and someone who wants very much to know details like that may do that.

Nico
May 20, 2009

Thanks man, you saved my life.

Works beautifully. Compiles, and the apps run fine on my iPhone too.

Benjamin
May 25, 2009

The SDK runs well on my PowerBook with G4 1,33 Processor, but the simulator not runs, i can start it and surf in it with safari, but i can´t runs my apps in it, if I trie it, it says “No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=ppc, VALID_ARCHS=i386).
Who can helps me???

Benjamin
May 25, 2009

Oh, after a restart, the iphone simultor works too!!!

Tom
May 31, 2009

For Dan - I had the same problem (it reporting that VALID_ARCHS=ppc970) until I replaced the Identifier = ppc970; line on the G5 entry with Identifier = ppc;

After this, and restarting XCode, things started working.

Of course it sounds like you might have tried this already.

Cris
June 4, 2009

Great, now i can develop on my 1st generation Mini Mac !
Thanks so much !!!!

mo
June 10, 2009

Works with sdk2.2.1 too. Thanks a lot! I finally got Leopard installed on my mac mini g4 just to find out, that the iPhoneSDK wasn’t working … that was a bummer, I didn’t even think it couldn’t work. Thank you so much for the instructions! You made my day :D

simplymuzik3
June 17, 2009

I get this error when I try to test it on my 3.0 ipod touch device:
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

and it also says:

collect2: ld returned 255 exit status

Does anyone know how to fix this error? In the description it says “bad CPU type in executable” I have the 3.0 sdk working fine, but I cannot get the app to run on my device. Any help is GREATLY appreciated! Thanks so much for this helpful resource!

Can Aksoy
June 19, 2009

I have same errors while compiling the project
* failed with exit code 1
* bad CPU type in executable
* error -10661
xcode 3.1.3 OS 3.0 @ Mac Mini (non-intel)
I try Simulator 3.0 / Device 3.0

kumar
October 14, 2009

Hi thanks a lot for saving my day.. i have installed the SDK.. also i hav created a sample app.. but the problem is im getting the following 3 errors while build the project
1. /Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Interface Builder/plug-ins/IBCocoaTouchOlugin.ibpligin/Contents/MacOS/IBCocoaTouchPlugin: no matching architecture in universal warpper
Command /Developer/usr/bin/ibtool failed with exit code 1

2. stdarg.h : No such file or directory
3. float.h : No such file or directory

please anyone tell wts happnning!!!!!

duynii
November 16, 2009

I have the same problem:
/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Interface Builder/plug-ins/IBCocoaTouchOlugin.ibpligin/Contents/MacOS/IBCocoaTouchPlugin: no matching architecture in universal warpper

Have to try identifier ppc7400, hope that’ll work.

duynii
November 16, 2009

Can any1 please send me an SDK 2.2.1 IBCocoaTouchPlugin file? I read on other post that this you can use 2.2.1 on PPC.

nono
January 1, 2010

this way don’t work before Iphone sdk 3.0 again““`

Bloohair
January 9, 2010

I think Apple have anti socially fixed it so that iPhone SDK 3.1.2 etc will not work on anything but an Intel Mac. I’ve been trying to get this fixed since before xmas and have now had to admit defeat.

I’ve had the same error messages as you guys too.

I don’t think you can retrospectively get SDK2.2.1 either.

Such as shame, my G5 running Leopard OSX 10.5.8 shows no sign of aging.

Better save up for an Intel Mac then!

zanaflex
February 15, 2010

was a little behind looking at them, turned to an adjutant to ask
elavil

Slumber
February 20, 2010

Hi Guys,

Have a Power pc g5 Mac os X 10.5.8 and have followed all the steps outlined above. I am running xcode version version 3.1.4 which worked fine before downloading and trying to include the iphone dev stuff. The version of iphone sdk 3.1.3 i have tried to install using the above steps now gives me the following errors when i try to open xcode. Any fixes? do i have to get a new intel mac for development work?

Internal error
File: /SourceCache/iPhoneXcodePlugin/iPhoneXcodePlugin-179/XCRemoteIPhone.m
Line: 88
Object:
Method: beginListeningForDevices

jingxin
February 23, 2010

I follow those steps. but I get a error that:
File: /SourceCache/iPhoneXcodePlugin/iPhoneXcodePlugin-179/XCRemoteIPhone.m
Line: 88
Object:
Method: beginListeningForDevices

No device support packages are installed. You may continue to use Xcode, however, device management functionality will be unavailable.

Then, I continue. When I build and go, the error that ibtools cannot open that type of file come up.

CMA
March 14, 2010

I followed the steps in this article, but I ran into the same problem as Slumber and jingxin (above). I am using a PPC G5 Quad Processor. Can anyone help?

Tricia
March 16, 2010

I tried this, but when I start Xcode I receive the following message: File: /SourceCache/iPhoneXcodePlugin/iPhoneXcodePlugin-179/XCRemoteIPhone.m
Line: 88
Object:
Method: beginListeningForDevices

No device support packages are installed. You may continue to use Xcode, however, device management functionality will be unavailable.

In addition, when I try to begin a new project, there are two choices under “IPhone.” The first is “Application” and the second is “Library.” What can I do???

simon
March 18, 2010

i just downloaded the SDK (the current 3.1 from the apple site as that is all i could find)

I am running a PowerBook G4 (1.67 Ghz) and OSX 10.5.8.

I can launch all the programs after making your fixes, EXCEPT iPhone Simulator and Instruments, which leaves me up the creek without a paddle :(

Are there any workarounds to make everything work????

Thanks

Michael
March 21, 2010

Thank you big times! It is very seldom that something explained on the www works right out of the box. Yours did! You saved me a lot of time and money. Thank you!!!
I have an iMac 2GHz PowerPC G5 with Mac OS X Version 10.5.8 running and installed, thanks to your help, this: iphone_sdk_for_iphone_os_2.2.19m2621afinal which I downloaded here: http://adcdownload.apple.com/iphone/iphone_sdk_for_iphone_os_2.2.1__9m2621a__final/iphone_sdk_for_iphone_os_2.2.19m2621afinal.dmg

flomax buy online us
May 4, 2010

dfvdfrsflomax canada price,7532 if ewjdnxcs

Benedict
May 31, 2010

You are a hero! =)

ayasean2 denmark
July 23, 2010

you are hero it is working in imac 10.5.8 not intel processer

best regards

Victor
July 28, 2010

I want to learn to program for iphone, i have a G5 PPC but i don’t want to pay 99.00 to download the sdk 2.2.1, is there a link where i can download it.

Thanks

Leave a comment