R – How to properly develop for the iPhone on a PowerPC Mac

iphonepowerpcxcode

I'm doing iPhone development on a PowerPC Mac. How do I get code signing to work properly so that I can build to my iPhone?

The iPhone SDK doesn't officially support PowerPC, but with some fidgeting, it can be installed. See here. I've got the SDK installed and running fine in Xcode and the iPhone simulator works fine.

However, I can't build to my iPhone in Xcode — the code signing is fubar. Some clever people have created workarounds here. Namely, I used the codesign script that Tiku posted along with some of the corrections. This has helped me make some progress. The code compiles now, but I still get an 0xE800003A error when it tries to deploy.

I think I have all my keys and provisioning profiles set up properly. My iPhone is registered for development, I've got the provisioning profile created. The AppID listed in the dev portal says MagicNumber.com.website.* and in my project, I have the Bundle ID set as com.website.${PRODUCT_NAME:identifier}. In project settings, product name is HelloWord, and the code signing identity is my developer certificate.

The console log of the iPhone says:
Wed Feb 18 14:57:55 unknown afcd[180] : user mobile has uid 501

Wed Feb 18 14:57:55 unknown afcd[180] : mode is 0x41e8
Wed Feb 18 14:57:55 unknown mobile_installation_proxy[182] : install_embedded_profile: Skipping the installation of the embedded profile
Wed Feb 18 14:57:55 unknown mobile_installation_proxy[182] : verify_executable: Could not validate signature: e800800e
Wed Feb 18 14:57:55 unknown mobile_installation_proxy[182] : preflight_application_install: Could not verify /var/tmp/install_staging.QNk2sD/HelloWorld.app/HelloWorld
Wed Feb 18 14:57:55 unknown mobile_installation_proxy[182] : install_application: Could not preflight application install
Wed Feb 18 14:57:55 unknown mobile_installation_proxy[182] : handle_install: Installation failed

Any help is appreciated!

Best Answer

I had the same problems as you - I could cross compile and install the app on the iphone, but it would always fail with a security violation.

To get around it, I had to jailbreak my phone and install a patched MobileInstaller (I believe the Cydia app now has package called Installous which patches your MobileInstaller. Unfortunately, I think Installous is also used to pirate apps). Then in your project's Info.plist, you need to add the following:

<key>SignerIdentity</key>
<string>Apple iPhone OS Application Signing</string>

This will allow your phone to run unsigned binaries, which is the only way I was able to develop from my ppc mac.

I'm still able to purchase apps from the appstore and have them run without any problems.