How-to: Get the 3.0 SDK running on a PPC

Most of us PPC users cringed a little when Jobs announced that the SDK was compatible only with Intel machines - he left a huge section of developers in the dust. Strangely enough, every version of the SDK has been compatible with PPC, at least for writing code to be emulated: the compiler that actually creates code for the iPhone won’t work, but hey, emulating is better than nothing. So anyways, here’s a little write up of my personal experience with getting the SDK running on a PPC.

Step 1. Download the SDK - this should be pretty straightforward.

Step 2. Make the SDK dmg editable - this can be done by dragging the dmg into Disk Utility, then clicking Convert, and setting the output file’s Image Format to ‘read/write’. If you have trouble with this method, try choosing New Image, and creating a read/writable image that’s a bit bigger than the dmg. Then mount the SDK dmg and the new image, and drag all files from the SDK into the new image.

Step 3. Edit the install scripts - If you go ahead and try to install the SDK now, it won’t let you. This is because the Installer program runs some scripts to make sure you have an intel processor, among other things. So we have to trick it into thinking we do. Open your writable dmg, and make some space by deleting a file. I deleted the PDF in the root of the dmg. Now browse to Volumes/iPhone SDK/iPhone SDK.mpkg/Contents (you may have to right click the mpkg and press View Package Contents to open as a directory). Open iPhoneSDK.dist in TextEdit or another editor. Go down to the function “agreeToSLA()”. Change the “return false;” statement at the end of this function to “return true;”. Now go down to the function “SDKPresent()”. Again, change the “return false;” statement at the end of this function to “return true;”. Save, and that’s it! If you’re having trouble saving, read step 2 again and follow the alternate method. Installer now recognizes your machine as Intel: go ahead and run the main Installer package.

Step 4. Modify XCode’s Default Settings - In the 2.0 SDK, you could simply install and compile - you’d get a warning since your processor wasn’t supported, but we all know warnings don’t matter at all! As of the 3.0 SDK, Apple upped the ante and changed this warning to an error - you can’t compile if Xcode senses your processor isn’t supported. Thankfully, Xcode leaves its configuration files out in the open. Browse to /Developers/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Specifications. Make a back-up of the iPhone Simulator Architectures.xcspec file, and replace it with tbradford’s file which you can download from here.

Step 5. ???

Step 6. Profit - Launch Xcode and compile a sample app. Watch as the emulator pops up and your jaw coordinately drops.

Now all that’s left to wonder is why Apple didn’t just release a Universal build. It basically works for PPC’s, with the exception of the actual arm compiler. Am I missing something?

That’s it for now
Joe

Sources: here and here

4 Responses to “How-to: Get the 3.0 SDK running on a PPC”

  1. Pink iPhone » How-to: Get the 3.0 SDK running on a PPC Says:

    […] urbanupdater wrote an interesting post today onHere’s a quick excerpt Most of us PPC users cringed a little when Jobs announced that the SDK was compatible only with Intel machines - he left a huge section of developers in the dust. Strangely enough, every version of the SDK has been compatible with PPC, at least for writing code to be emulated: the compiler that actually creates code for the iPhone won’t work, but hey, emulating is better than nothing. So anyways, here’s a little write up of my personal experience with getting the SDK running on a PPC.  […]

  2. J2me Blog » Blog Archiv » How-to: Get the 3.0 SDK running on a PPC Says:

    […] (via iphone dev-blog) […]

  3. Pit Says:

    Hi,
    as an update, i just did this with the final 3.1 SDK (dating June 19th 2008) and a PowerPC iMac. Great idea to just patch the installer! :)
    i’ve had to add one thing to make it work: change the return false of function isIntel() into true as well.

    BTW. i’ve also successfully run a self-built Example App on my iPod touch! I’ve had to power off and on my iPod before this worked though, otherwise i’d get a 0xE8000001 exception “Verifying application” - after restarting my iPod, i could launch an app once (out of Xcode - “build and go”), so it’s kinda annoying, but it works!

    Best Regards,
    Pit

  4. iPhone download sites Says:

    iPhone download sites…

    I was looking through your past posts. Great job there….

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word