Q: Where do I get started with developing for jailbroken iOS?


A: It helps to know something about developing for normal iOS. You might also check out the iPhone Dev Wiki (http://iphonedevwiki.net/).

Q: I tried to compile something with gcc, and I got some kind of error relating to missing header files. Shouldn't those be on the phone already? Has this thing been tested?


A: Yes, iphone-gcc has been tested ;P (it happens to work even better than Apple's compiler, thank you very much; I spent longer debugging complex code cases than they did). The deal is that the best set of headers available for this package include parts of Apple's SDK, which is still under NDA. We therefore can't distribute those. We can distribute some semi-broken headers, and you can find those in the couple iPhone Toolchain/Header packages available in the default repositories.

Q: Whenever I run programs I compile with your toolchain, they are immediately "Killed". I hate Apple :(.


A: The new iPhone OS only wants to run signed code. This was mostly fixed by some kernel patches added by PwnageTool, but you still need to at least add a valid CodeDirectory to the binary that contains SHA1 hashes of the executable. There are a few different ways of doing this, documented in an article on Bypassing Code Signature.

Q: I tried copying a graphical program to the iPhone, and ran it from the comand line. I am nearly 100% certain my program is correct, and I did your codesign instructions, but it doesn't work.


A: You can't run things from the command line anymore, you have to run them from SpringBoard.

Q: Ok, but when I copied the file to /Applications it didn't even show up in SpringBoard. For the record I am using iPhone OS 2.1, which I'd assume would handle this like evil magic somehow as its newer/better.


A: In order to gain some of its new-found speed, iPhone OS 2.1 caches the Info.plist files of all installed applications in a centralized place. The fastest/bestest way to handle this cache is to install UIKit Tools and then run its uicache as mobile.

Q: When I add setuid bits to my program, it no longer starts up and syslog doesn't seem to provide any useful information, either (True?).


A: I am not quite certain what is preventing this. However, it is easy to defeat: replace your program with a two line shell script that, in turn, runs your program. Example, maybe MyProgram (setuid) gets renamed to MyProgram_, and MyProgram (not setuid) becomes the script:


#!/bin/bash
dir=$(dirname "$0")
exec "${dir}"/MyProgram_ "$@"