First of all, I am not working on tool chain or jail-break applications. But I do respect for them!
[update 15 May 2009: I have written a video tutorial to explain all the steps in this tutorial. Video Tutorial: Bypassing Code Signature in Xcode & Installing jail-break application to iPhone]
I am iPhone SDK developer but I got a tricky task to published one application on Cydia as Apple will not accept Video Sharing application on App Store. It was really tricky stuff for me as I was submitting application on apple store once a week and its less then an hour work. But to submit your application on Cydia took 3 days of continuous efforts and at last I was jumping when I submit the application on Cydia. I got lot of help from different websites but none of them are used as complete reference. So I thought, I should write a complete article for this. So let just start.
There are two things you should follow to submit your application on Cydia:
1. You should build your application such a way that it can run on any iPhone. For that, you have to bypass the “Code Signatures”.
2. You have to follow a lengthy process to make your application package, So that it can easily be submitted to Cydia.
So Lets start from 1st point and then moves to 2nd one.
Build Your Application for Jail Break:
As I said earlier, you just need to bypass the Code Signatures in Xcode. You can easily achieve this by following 5 steps:
- You will need a certificate on your mac machine (Keychain Access), so that when Xcode build an application it wont give you any error. So to make a certificate on your mac machine, you follow the steps mentions on apple website. Obtaining a Signing Identity(http://developer.apple.com/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html#//apple_ref/doc/uid/TP40005929-CH4-SW1). Once you created the Certificate it will appear on your KeyChain access tool.
- Make a backup of the file /Developer/Platforms/iPhoneOS.platform/Info.plist then edit it to include the bit in red:
<key>PLIST_FILE_OUTPUT_FORMAT</key> <string>binary</string> <key>PROVISIONING_PROFILE_ALLOWED</key> <string>NO</string> <key>PROVISIONING_PROFILE_REQUIRED</key> <string>NO</string> <key>SDKROOT</key> <string>iphoneos2.2</string>
- in Xcode – > project – > edit project setting -> Add User – Defined Setting
PROVISIONING_PROFILE_ALLOWED : NO PROVISIONING_PROFILE_REQUIRED : NO
- Open your project and go to (menu) Project > Edit Project Settings. In the list of properties, find “Code Signing Identity” > “Any iPhone OS Device” and click in the empty box. Assuming there are no entries in the menu, click “Other” and type in the same name you used to generate the certificate (code signing certificate) above in step (1). Hit OK and close that settings window.
- Add the following to the Info.plist for your project:
<key>SignerIdentity</key> <string>Apple iPhone OS Application Signing</string>
Set up your Xcode like this in upper left corner : “Device | Release”. Build your project in Xcode like normal (Not ‘Build and Go’, just ‘Build’). After build is successful, go to your ‘Products” folder on left side of Xcode screen. highlight the ‘.app’ product (‘YourAppName.app’). Control-click and select ‘Reveal in Finder’.
Take that resulting directory in Finder (should be in YourProjectDirectory -> build -> Device-iphoneos folder) and ssh that into /Applications folder on iPhone.
Now go into Cydia and install the ‘Link Identity Editor’ (if you type ‘ldid’ into search field, it’s the only package that pops up).
After that’s installed and your app is ssh’d into ur phone, open up Terminal on ur mac. Run these:
$ ssh root@ip address (ip address is address of ur iphone. Password is alpine). $ ldid -S /Applications/YourApp.app/YourApp $ killall SpringBoard
Your app should run on your jail-break iPhone. If it runs successfully then it will run on all other iPhone as well.
Make Package for jail break application (Cydia repository):
This is a lengthy process and I think I don’t need to write all the way down when someone already put lot of efforts on this.
Simply go to http://www.hackthatphone.com/20/creating_a_cydia_repository.html and follow the steps
The purpose of this tutorial was to make everything available under one post! So that no one waste his/her 3 days in searching for a simple thing.
If you have any question regarding this, please feel free to post in comments.
Thanks to HackThatPhone.com, iphone.cazisoft.com, arrix.blogspot.com & ipodtouchfans.com which helps me to publish application on Cydia.
Popularity: 20% [?]