How to Install the iPhone 2.2.1 SDK on a PowerPC-based Mac

23 03 2009

Update: I forgot to mention that I got help from the great folks at NSCoder Nights in San Francisco when mucking about the installer and Xcode files. Particularly helpful were Bruce Spath and Dan Grover. Thanks again, guys!

Here’s how you can install the iPhone SDK for 2.2.1 on a Mac running at least MOX 10.5.5:

1. Ensure you have at least 6 gigs of disk space available. If you have tried to install the iPhone SDK on the target volume before, it may state an upgrade will be performed instead of an install. Sadly, the only solution I currently have for this situation is to uninstall Xcode using /Library/Developer/3.1/uninstall-devtools.
2. Download the SDK disk image.
3. Mount the image by double-clicking it.
4. Copy the mounted volume to a hard drive.
5. Navigate to iPhone SDK.mpkg/Contents/iPhoneSDK.dist in the copied folder and replace line 340 which should be
start_selected = "isIntel() && hasRightOS() && agreedToSLA()"

with
start_selected = "true"

6. Run the installer, selecting either the default location /Developer or another directory name if you’re looking to preserve your current Xcode installation.
7. After a successful installation, navigate from the installation directory (default of /Developer) to /Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Specifications/iPhone Simulator Architectures.xcspec, and make the following two changes.

First, replace

{ 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";
},

with

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

then, replace

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

with

{
Type = Architecture;
Identifier = i386;
Name = Intel;
Description = "32-bit Intel";
"PerArchBuildSettingName" = Intel;
ByteOrder = little;
ListInEnum = NO;
SortNumber = 105;
},
{
Type = Architecture;
Identifier = ppc;
Name = "Minimal (32-bit PowerPC only)";
Description = "32-bit PowerPC ";
"PerArchBuildSettingName" = PowerPC;
ByteOrder = big;
ListInEnum = No;
SortNumber = 201;
},
{
Type = Architecture;
Identifier = ppc7400;
Name = "PowerPC G4";
Description = "32-bit PowerPC for G4 processor";
ByteOrder = big;
ListInEnum = NO;
SortNumber = 202;
},
{
Type = Architecture;
Identifier = ppc970;
Name = "PowerPC G5 32-bit";
Description = "32-bit PowerPC for G5 processor";
ByteOrder = big;
ListInEnum = NO;
SortNumber = 203;
},

Now go ahead and start Xcode and when you select the “File > New Project…” menu item, you should see a darling iPhone category for projects. Also, run the iPhone simulator in /(Xcode install path)/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\\ Simulator.app, it’s really mind-blowing to run it on your desktop, especially one Apple tells you isn’t able to run their iPhone SDK.

By the way, if you don’t feel like going through these steps yourself I’ve put together iPhoneSDKonqueror, an app which will handle these steps for you in a mostly automated manner. You should buy it. It’s only USD$5 and if you appreciate the ability to use your PowerPC Mac to write apps for the iPhone, it’s the right gesture to make to me.


Actions

Informations

35 responses to “How to Install the iPhone 2.2.1 SDK on a PowerPC-based Mac”

31 03 2009
RDevitt (09:34:22) :

This is excellent! I haven’t tried it yet, but I will be doing so as soon as I get home. This is the only thing that’s kept me from becoming an iPhone developer. I’ve been waiting until I had the money to buy an intel mac, but now I can start without that. Thanks a million!
I wonder if this will possibly work with the 3.0 SDK?

31 03 2009
huperniketes (10:03:35) :

I’ve been trying to get my hands on the 3.0 SDK beta to find out. (I haven’t gotten registered as I need to submit the proper paperwork before they’ll approve me; paperwork which is in Florida whereas I’m still stuck in Silicon Valley.)

2 04 2009
Joe Moran (08:42:43) :

This is essentially the same steps as some other instructions I found about a year ago, although there was more manual work involved. A shortcoming of that install hack was that while you can run apps in the simulator, you couldn’t compile apps and install them on an actual iPhone for testing.

From looking at your code changes, they’re identical to those from the more manual process I found in that they just get the software packages installed on the machine and mod the simulator config to let it run on PowerPC. Have you been able to get an app compiled and installed on an iPhone? How about monitoring the app with Instruments while it’s running on the iPhone? If yes to both, that’s fantastic news and I’ll use this approach with a clean installation. Otherwise I’m still looking at buying new hardware in the near future.

2 04 2009
huperniketes (09:36:52) :

It might have been necessary to install the packages separately before, but they install easily enough now as part of the meta-package once the test for an Intel-based target volume has been bypassed. Whether this allows apps to be developed completely on a PowerPC host or not I can’t tell as I’m not yet a registered developer. But given the ability to run the simulator, as well as compile apps, I wouldn’t see any technical reasons it shouldn’t work. Once I’m able to get an official cert I, or someone else who does, will be able to figure it out. I’m certain of that.

Does anyone have news on this front?

2 04 2009
David (09:55:51) :

Wasn’t able to get the app to work–license activated fine but couldn’t get anything to happen.

Used the steps above and it worked just fine. Keep the $5 for the info above!

iMac G5

2 04 2009
huperniketes (10:14:44) :

iPhoneSDKonqueror didn’t work right? I had another similar report, but I’m having difficulty reproducing it. What is the app doing? Have you downloaded the 2.2.1 SDK already?

I’ve set up a forum to work out issues with the app itself (and hopefully, ways to install built apps onto the iPhone and iPod touch!).

Who knows? With enough fight, we might even be able to get Apple to officially support the PowerPC Macs!

2 04 2009
RK (10:40:51) :

Thank you, thank you. I shall try this tonight.

2 04 2009
Joey Lange (23:39:39) :

I’m having trouble getting it to work. I opened it, then realized I had to double-click on my license to get it to work, then the app hanged (hung?) and it finally ended “unexpectedly.” That was probably due to my one-or-two forcequits but I was just thinking it was hanging. Is the app supposed to give some sort of notification as to what on earth is going on?

3 04 2009
huperniketes (17:10:13) :

Yes, it’s supposed to display file dialogs and alerts as it guides you through the installation process. Please help me isolate the cause by following and responding to the bug report.

3 04 2009
Mark (19:56:45) :

A warning to people who want to develop iPhone Apps on a Power-PC.

Last year I developed my iPhone App on a PowerPC using hacks like those described her, and I got it running on the simulator and on my iPhone.

But when I went to upload the app’s binary to the App Store using iTunesConnect, it was immediately rejected by the upload software because it was “improperly signed.”

When I rebuilt the binary using an Intel Mac, I was then able to upload it.

3 04 2009
huperniketes (20:01:33) :

Once I get a cert (and of course, an iPod touch) I’ll work on figuring out how to get my Mac to install apps built on it onto the mobile devices.

Alfonso

4 04 2009
matt (17:29:05) :

I’ve also just bought the installer and it refuses to do anything at all after launch and activation with my licence.

I’m running it from the same directory as my SDK .dmg

4 04 2009
matt (18:10:17) :

the correct command to do a full uninstall (yes, I’m still on step 1) is:

sudo /Developer/Library/uninstall-devtools –mode=all

5 04 2009
George (16:38:17) :

Unfortunately, the App does nothing except phone home. Some instructions would be useful. You can keep my $5 though, because your tutorial still saved me a bunch of money.

7 04 2009
mhs (13:37:54) :

The solution is great. Can u find me a way so that I can modify it to make it work with Mac OS X Tiger instead Leopard? Plz…

7 04 2009
mhs (17:23:08) :

Is it possible to install it on Mac OS X Tiger?

7 04 2009
huperniketes (18:50:41) :

I won’t say it’s impossible that the SDK actually would run on PPC Tiger, but quite unlikely. I believe that Xcode uses the Leopard GC Cocoa runtime, which would require back-porting it to Tiger.

I’m sorry, but anything at least that involved would take too much time or me to currently undertake.

9 04 2009
JOHN (18:26:36) :

I want to start developing apps; what programming language does the SDK use? Is it like Java, C+ or what? Is the $99.00 download from Apple designed for beginners? What advice does anyone have for a beginner with no experience.

11 04 2009
Twig (12:26:02) :

I didn’t manage to compile a project on my G4, I get an internal error:

“ibtool failed with exception: IB requires the Cocora plug-in”

any ideas?

12 04 2009
Twig (14:33:31) :

Finally made it to work on my G4 - I had to install not only those packages starting with “iPhone..” - don’t know which one was missing, cause I’ve installed all of them :)

12 04 2009
mhs (14:50:48) :

It’s Objective-C. I think the $99.00 fee is for an individual or a small team. If you have no experience, all I can say is good luck learning the language. You can check the hardware & software requirements for the iPhone SDK at Apple’s Developer site.

12 04 2009
Ramesh (23:33:30) :

Neat Solution! Thank you

14 04 2009
ALF (10:43:34) :

Thanks for the info! It’s nice to be able to do development on my “old” G5 tower with big screen.

Unfortunately, as has been mentioned, the process goes kapooey when you try to build with certificates & provisioning so as to run on an actual device. Someone above said they got it running, but I don’t know how. I’ve been trying to get it to work for several days with no luck.

So if anyone out there cracks this nut, please post!

Cheers,
ALF

16 04 2009
MikeJones (13:13:43) :

Hey thanks for this guide. Any luck getting this working on a device?

19 04 2009
PKent (05:14:41) :

@Alfonso; Awesome work, thanks for sharing the details of your installer App. This could be a cost effective way to get more programmers up and running for me :) Anyone try this on a Power PC sawtooth 400MHz running OS 10.5 yet? LOL …but seriously I want to know if that works.

@John; For beginners go to developer.apple.com, navigate to the iPhone dev center and “register” for a free developer account, that will give you access to the SDK and everything you need to get started.

@Mark; Do you mean you had to recompile on your Intel Mac before you could submit to the AppStore?

20 04 2009
mhs (13:06:34) :

Is it possible to modify Google Android SDK to make it compatible w/ PPC?

20 04 2009
Fish (20:02:47) :

hey there. I followed these directions and got the SDK installed, Thanks for that.

I have been getting a recurring error that I haven’t been able to solve. I downloaded a sample app code from the dev area and when I try to build it to my iphone I get this error. Any chance its a PPC thing vs something else?

————————————————-

CodeSign /Volumes/Downloads/Metronome/build/Debug-iphoneos/Metronome.app
cd /Volumes/Downloads/Metronome
setenv CODESIGN_ALLOCATE /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
setenv PATH “/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin”
/usr/bin/codesign -f -s “iPhone Developer: First LastName” –resource-rules=/Volumes/Downloads/Metronome/build/Debug-iphoneos/Metronome.app/ResourceRules.plist –entitlements /Volumes/Downloads/Metronome/build/Metronome.build/Debug-iphoneos/Metronome.build/Metronome.xcent /Volumes/Downloads/Metronome/build/Debug-iphoneos/Metronome.app
/Volumes/Downloads/Metronome/build/Debug-iphoneos/Metronome.app: object file format invalid or unsuitable

21 04 2009
dipen (11:55:17) :

Hi ,
i tried this but failed. I am facing the following problem.
1) I have download iPhone sdk 2.2.1 dmg file, i have mounted it by double click on that file. Then i copied it to harddisk i gives me error some packages can not be moved.

27 04 2009
Nikos (09:11:07) :

Why do you have to do the following:

4. Copy the mounted volume to a hard drive.

WHy can’t you just use the desktop?

27 04 2009
huperniketes (11:08:12) :

My apologies for that. It seems iPhoneSDKonqueror couldn’t execute it’s internal scripts under certain conditions. The latest update takes them into account and corrects for them. It should work correctly for you now and running the original release should notify you of the updated version.

Alfonso

27 04 2009
huperniketes (11:13:47) :

It sounds like an IB plug-in is missing. Check the project docs for information on its requirements. A brief glance on Google didn’t turn up any info on any IB palette called “Cocora” though.

Alfonso

27 04 2009
huperniketes (11:14:53) :

I believe the Android SDK is OSS (Open Source Software), so it should be possible.

Alfonso

27 04 2009
huperniketes (11:15:47) :

You can do that, as the user’s desktop is just a folder within a hard-drive.

Alfonso

27 04 2009
huperniketes (11:19:14) :

Please post this to the iPhoneSDKonqueror forum where the discussion won’t get mixed up with the others.

9 05 2009
Etienne (10:01:50) :

I tried that with the new 3.0 beta 5.

After installing and editing everything, I double click on the xib file in my project only to get the message : The bundle “IBCocoaTouchPlugin” could not be loaded because it does not contain a version for the current architexture.

So inerface buider can’t open xib files anymore which needless to say is kind of a big deal.

Can anyone who’s runnning 2.2.1 send me their plugin ?

(It’s located at /Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Interface Builder/Plug-ins)

Maybe only copying the one from 2.2.1 will solve that problem ?

Leave a comment

You must be logged in to post a comment