iPhone SDK Beta 2 PPC Fix
So Apple released the second beta of their iPhone SDK today...
I work on PowerPC Macs because I haven't felt the need to plunk down a couple thousand dollars for another computer when my Powerbook still works perfectly fine. I did, however, purchase an iPhone, and I'd really like to develop applications for it. Considering the fact that I paid almost $600 (after activation, etc) for the thing, and I previously dropped $2500 for the PowerBook, I feel that Apple owes me something for the money spent.
The previous version of the iPhone SDK didn't install the Aspen platform packages on PPC, but you could still manually install those packages and compile for the simulator with a simple warning about your unsupported (ppc) platform. Apple changed that with the second beta. First, the Aspen packages have now been prefixed with 'iPhone'... No big deal. Second, they've unfortunately made it a compilation error to attempt to compile for the iPhone simulator using a PPC computer. I find this unacceptable and I’d like to pay bills rather than buy new computers, so here’s what I did:
- Once you've moved the iPhone platform directories to their appropriate location under /Developer/Platforms, drill into: /Developer/Platforms/iPhoneSimulator.platform/Developer/
Library/Xcode/Specifications/ - 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
- You'll notice in this file that the 'RealArchitectures' variable only defines i386 as a valid architecture. I change that to "(i386, ppc)"
- What I did next was essentially steal some of the definitions from the Mac OS X Architectures.xcspec file and added them to the end of the file.
After changing the file and relaunching XCode, my iPhone Simulator builds run fine... Not even the original warning. Wonderful!
[April 9, 2008 Note: This also works with the iPhone SDK Beta 3]
Technorati Tags: Apple, iPhone, PowerPC, Programming

26 Comments:
Fantastic work! I was pretty upset they changed a compile warning to a compile error just for the hell of it, and I'm going to give your steps a shot in a little bit and see if I can get things back up and running again.
Bingo! Thanks for sharing.
Sorry about the double post–I'm a little too quick with the mouse.
I can't wait to see what else they may throw at us PPC users for the next update. I know the writing's been on the wall for a while now, but this still seems a bit ridiculous. Anyway, thanks for the workaround.
And the NDA that you promised to adhere to in order to get the SDK?
What we're talking about here are the architectural specification templates that are a capability of the Xcode IDE; an IDE which is also distributed separately from the actual iPhone SDK, including as part of the Leopard distribution and retroactively not bound by iPhone SDK NDA.
By your logic, you could also say that people telling the world it is possible to manually install the iPhone platform packages is also bound by NDA, which it surely is not. 'Installing packages' has been a common occurrence since the beginning of Mac OS X.
thanks.
Speaking of which...anyone had any luck digitally signing their apps on PPC?
When that build phase runs, codesign keeps spitting out:
"object file format invalid or unsuitable"
It's finding my certificate and all that, but it doesn't like the executable for some reason.
That's great!
I'm iMac G5 user, and I was very upset about that last night. But now, my project be runnable again.
Thank you.
(from Seoul, Korea)
Thanks for the code - works great!
Question for the masses: when you run the simulator, do people still get the "Aspen" sim, or the new "iPhone" sim?? I'm still getting the Aspen one by default!
When I installed beta 2, it removed the Aspen items. During the install, I manually changed the install folder to /Developer...maybe that's what did it for me.
I get this error too. Same thing:
2008-03-30 19:47:32 [0x0-0x177177].com.apple.iphonesimulator[28541] Expected in: /usr/local/lib/libsqlite3.0.dylib
Please post a fix if you find one, I'll do the same.
Jean-Pierre, I had the same problem on one of my Leopard updates. The problem occurs because the simulator was linked against the sqlite shared library in /usr/lib while the version in /usr/local/lib exports incompatible symbols. I believe the incompatible version was one that I installed when still running Tiger. I remedied my problem by removing the version of the sqlite application and libraries under /usr/local
Thanks a lot!
Happy owner of PowerBook 12" and Mac mini G4
Any luck in compiling for the iPhone without the certificate?
I just compiled for the simulator, then copied the bundle into the iPhone:the app appears in the screen but after launch it doesn't work.
I'm going to play with project settings...
Yes! It works!
Thanks alot!
is sdk 3 fixable in the same manner?
This fix appears to work for the iPhone SDK beta 3.
I concur.
It sure appears to work with Beta 3 as well.
Yep, I had the same results. Going to add a note to the original post.
Thanks for your help in solving the ppc problem.
I am able to develop and test my code on iphone simulator now.
But when i try to build it for device,it says "Device not connected" even though i can see the iphone in itunes.
Please suggest the way to transfer our developed app on iphone.
works on beta 4!
Did you have any issues w/the code signing? Up until know, when building for the device, if I set the project up to sign the code and the code signing build step runs, it would always throw an error stating "object file format invalid or unsuitable". Just wanted to make sure I can still deploy to the device w/beta 4.
does it work on 10.4.11 Tiger or is it Leopard specific ?
I just want to say thanks for posting this, and confirm that it works with Beta 5.
Whooo hooo!
Got beta 5 working with opengl and everything. Thank you kindly for the fix.
Thanks man, I'v now finally got beta 5 running on my G4!!!!
you've saved me a pretty penny :P
Post a Comment
Links to this post:
Create a Link
<< Home