As a developer I don’t enjoy paying for things when I don’t have to. One of them happens to be Apples iPhone Developer program. I could find better ways of spending $99. Debugging my own stuff isn’t one of them. So what is a developer to do when he can’t or won’t pony up the money to be allowed to load and debug his own applications. He uses that tiny developer brain to bypass all the checks that’s how.
I’m not going to go into the ins and outs of jailbreaking the iPhone. There are plenty of tutorials on the net to do exactly that. If you are in over your head at this point you should probably bail now, shit is definitely not going to get easier from here on out.
Creating a certificate
You’ll need your own self-signed certificate. iPhone OS will check for it, jailbreaking will tell it that it’s good, regardless of who it came from. So crack open Keychain access and create one for yourself. It’s in /Applications/Utilities/Keychain Access.app. From the menu choose Certificate Assistant > Create Certificate.
Update the Developer stack
We’ll need to make a modification to the Info.plist of the SDK. Go to /Developer/Platforms/iPhoneOS.platform. Create a backup of Info.plist and open the original in Property List Editor. Change all instancese of XCiPhoneOSCodeSignContext to XCCodeSignContext. There are 3 instances of them in SDK 3.1.2. There might be more or less in future versions.
Back to XCode
In XCode open your project and change the Active SDK to iPhone Device – 3.1.2. Run the build command with Command-B. Go to the Directory with your project, open the build folder and into the Release-iphoneos or the Debug-iphoneos folder you’ll find the executable. We’re going to need to get this file into the iPhone.
Copy your application to iPhone
You won’t be able to get your application onto the phone using the normal channels. iTunes won’t allow it. So the alternative is to copy it to the phone using SSH or iPhone Explorer. As with all things Mac, iPhone Explorer provides a GUI. And a GUI is always handy. Using iPhone Explorer go to the /Applications folder on the device. And upload your app folder. When complete it should appear like this. In some cases the app won’t be set to executable. If this is the case you’ll need to run the “chmod a+x” on the app folder to allow it to run.
Your application won’t be present on the springboard. For that you’ll need to restart the springboard. There are jailbreak applications that allow for this. You can also install the UIKitTools and run uicache from the commandline to update the springboard without restarting it.