Thursday Night

Paul Betts’s personal website / blog / what-have-you

Running your iPhone SDK App on iPhone without the App Store

Writing your own iPhone apps is fun and all, but it’s completely useless to me if Apple’s going to make me pay $100 and wait for months to get it onto my phone – one of the flat-out stupidest things that mar an amazing product; well luckily, the hackers are stepping up and turning Apple’s cathedral into a bazaar by Jailbreaking out of Apple’s code-signing prison, and creating an awesome alternative to App Store called Cydia.

Using some elbow grease, you can write an app using Apple’s official SDK, test it in the simulator, then actually put it onto the phone to see how it works. If it works great, either host your own F/OSS iPhone repository, or pony up the cash and get it into the App Store.

Or, just click on this:

Here’s the steps to get an SDK app onto your phone:

  1. Since Apple enforces codesigning on the iPhone, you need to Jailbreak your phone – otherwise we have to have a dev key.
  2. Build your app using the “2.0 Device – Release” profile (*not* Simulator)
  3. Using Cydia, install OpenSSH, and use the network preferences pane to figure out your IP address
  4. Open up a terminal, and get your app onto the phone:

    cd /path/to/my/app/build/Release-iphoneos
    tar -czpvf MyAppName.tar.gz MyAppName.app
    scp MyAppName.tar.gz root@192.168.xxx.xxx:/Applications/   # Replace with your iPhone’s IP
    ssh root@192.168.xxx.xxx
    cd /Applications
    tar -xzpvf MyAppName.tar.gz
    rm MyAppName.tar.gz

  5. We need to “fake sign” our binary, so keep typing in the terminal…

    apt-get install ldid
    cd MyAppName.app
    ldid -S MyAppName
    exit

  6. Now, restart your iPhone – you should see the app in your Springboard

I make no guarantees about this method, but it at least worked with the AccelerometerGraph.app sample that Apple ships (and that ironically is completely useless unless it’s on an actual phone).

Update: Getting your apps into the Cydia list is as easy as going to this website and submitting a description / package – just like App Store, only way easier and Free’er!

Written by Paul Betts

July 22nd, 2008 at 10:41 pm

Posted in Apple, Programming