I use iPhone SDK with 2.2.1 support. The SDK doesn't do the code signing check if you select the runtime of 2.1. A 2.2.1 iPhone runs 2.1 program as well. However, if you select 2.2.1 runtime for your program, you get code signer error on build.
You can sign up Apple's developer program and pay the $99 for a developer certificate, code sign your Hello World and deploy to the iPhone as per Apple instruction. I decided to defer this approach until I feel serious enough.
Instead, I took the following steps for a self signed identity to deploy my first iPhone program to the device.
1. Create a self signed identity "iPhone Developer" base on the following Apple note.
http://developer.apple.com/documentation/Security/Conceptual/CodeSigningGuide/Procedures/chapter_3_section_2.html
2. Edit /Developer/Platforms/iPhoneOS.platform/Info.plist with the
following:
<key>OverrideProperties</key>
<dict>
<key>CODE_SIGN_CONTEXT_CLASS</key>
<string>XCiPhoneOSCodeSignContext</string>
<key>DEBUG_INFORMATION_FORMAT</key>
<string>dwarf-with-dsym</string>
<key>EMBEDDED_PROFILE_NAME</key>
<string>embedded.mobileprovision</string>
<key>SDKROOT</key>
<string>iphoneos2.2.1</string>
<key>PROVISIONING_PROFILE_ALLOWED</key>
<string>NO</string>
<key>PROVISIONING_PROFILE_REQUIRED</key>
<string>NO</string>
</dict>
3. In xcode "Project Setting";
Code Signing Identity:Any iPhone OS Device=iPhone Developer
4. In xcode, execute "Build" not "Build and Go"
5. Connect iPhone
6. SFTP (root/apline) the app archieve (e.g. HelloWorld.app directory) to iPhone's
/Applications directory
7. SSH to iPhone
8. Execute the following in SSH
ldid -S /Applications/HelloWorld.app/HelloWorld
chmod +x /Applications/HelloWorld.app/HelloWorld
9. Use BossPref to respring
Congradulation, you shall be to run the program from your iPhone instead of the SDK's simulator.
Some other reference:
How to deploy an iphone application wihtout an IDP membership
Thursday, March 12, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment