On-Device Testing w/out Paying $99 (Updated on 4-14-2010)

Post Updated 4-14-2010

Fourth update: This works fine on the latest Xcode for iPhone OS 4.0 beta (3.2.3 pre-release) – see notes on the bottom!

IMG_0061Want to develop and test applications ON your actual device, rather than testing it in the simulator without paying a dime? If so, you’re in the right place!

The process is EXTREMELY easy, and takes less than a minute! This has been working on all versions of Xcode 3.1.4, 3.2.2, and the latest 3.2.3 beta (for iPhone OS 4.0).

You must first make a ‘pwned provisioning profile’, which only needs to be done once. Make sure Xcode isn’t open. To do this:

  1. Open up Keychain Access in Applications>Utilities.
  2. Go to Keychain Access>Certificate Assistant>Create a Certificate.
  3. For ‘Name’, type: iPhone Pwned Developer
  4. For ‘Identity Type’, leave it as ‘Self Signed Root’.
  5. For ‘Certificate Type’, choose ‘Code Signing’.
  6. Check the box for ‘Let me override defaults’.
  7. Click on Continue, and in the popup box that comes up.
  8. Type in any number under ‘Serial Number’.
  9. Leave ‘Validity Period (days)’ alone.
  10. Click on Continue.
  11. Fill in the details with whatever you want (not really necessary).
  12. Click on Continue.
  13. Click on Continue for the rest of the dialog boxes.

If successfully created, the last screen that shows up should say ‘Your certificate has ben successfully created.”. Click on the Done button, and close out of Keychain Access.

Now comes the next step, which is to edit the Info.plist for the iPhoneOS.platform container:

  1. Open /Developer/Platforms/iPhoneOS.platform/Info.plist with Property List Editor.
  2. Look for all ‘XCiPhoneOSCodeSignContext’ VALUES. Replace that with ‘XCCodeSignContext’. There should be two or three to replace.
  3. Save the file.
  4. Restart Xcode, and build your app for a device.

===============

UPDATE!

Open up your project settings in Xcode (Project>Edit Project Settings), go to the Build tab, and under ‘Code Signing’, extend ‘Code Signing Identity’, and choose ‘iPhone Pwned Developer’, which should be the name of the certificate you just made above.

===============

UPDATE2!

You must have the installd patch installed through Cydia on your jailbroken device. You can add the cydia.hackulo.us repo (Manage>Sources>Edit>Add), and install AppSync 3.1.

===============

UPDATE3!

This guide works on the latest Xcode 3.2.2 (pre-release) beta for iPhone OS 3.2.

===============

UPDATE4! 4-14-2010

This guide works on the latest Xcode 3.2.3 (pre-release) beta for iPhone OS 4.0. BUT, don’t update your device to 4.0. It has to be jailbroken if you want to transfer your apps and whatnot (see update2).

===============

You should now be running your app on your device, and, oh yeah, you didn’t pay $pple their $99!

You can leave a response, or trackback from your own site.
  • http://gumballtech.com brian

    This works on 3.1.4 and 3.2.2.

  • Tyler29294

    It works! I used the oraganizer and installed it through that. So easy! Thanks for this!

  • iDarbert

    The guide worked perfectly for me, but I found myself with a strange issue I don't really know how to start solving.
    It seems like apps I build with XCode and run on my Jailbroken iPad aren't able to properly store and load values from/to the iPhoneOS' keychain, has anyone else experiences this?

  • Pingback: Hello iFour » 不付费($99)真机测试iPad/iPhone/iTouch应用[亲测]

  • Josso

    It looks like this works with the final version of 3.2.3, too.

    I did everything named here, but when I tried to debug on the iPod Touch the debugger complains:

    Loading program into debugger…
    Program loaded.
    target remote-mobile /tmp/.XcodeGDBRemote-27874-31
    Switching to remote-macosx protocol
    mem 0×1000 0x3fffffff cache
    mem 0×40000000 0xffffffff none
    mem 0×00000000 0x0fff none
    run
    Running…
    Error launching remote program: failed to get the task for process 219.
    Error launching remote program: failed to get the task for process [random number].
    The program being debugged is not being run.
    The program being debugged is not being run.

    If I launch it myself, it opens just fine – but the debugger doesn't work. :/

    Any solution to this?

  • Josso

    Apparently this won't work with debugging on the device.
    Another method that works can be found here: http://www.alexwhittemore.com/?p=354

  • Pingback: On device testing without paying $99/year | Jonathan Leang's Blog

  • Guest

    Does this work on a iphone 4 without jailbreak?

  • http://gumballtech.com brian

    I haven't tried this in a long time, but in sure it will work WITH a jailbreak. It won't work without a jailbreak, since you'll need AppSync. You better jailbreak before Apple pulls the plug!

  • http://twitter.com/elisamuel40 Eli S. Sanchez

    Thanks, as Josso said, works with the final version of 3.2.3!

  • Lazboy1000

    This works with Xcode 3.2.4! Not sure if it works with iOS 4.1 though.

  • ahub

    works with 3.2.5 and iOS 4.2

  • theinsane

    I wu you so frickin much!

  • Rick Jackson

    Hello To All,

    I Dont Know What i did Wrong The Error i am getting is : The Identity Used to Sign The Executable is not Longer Valid. Please Verify that your device clock is properly set and that your signing certificate is not expired.

    Any Help will be Appreciated…….

    Thanks

  • http://nowsci.com Fmstrat

    For us new developers, could you please provide some more information as to how to apply the provisioning file to the iPhone/iPad? After it’s created in the keychain, I’m not even sure where the provisioning file is placed. Thanks.

  • thefatpanda

    hi,

    I’ve followed these steps (including the updates) but my iPhone has iOS version 4.2.1 on it and it seems like it’s not working. my Xcode version is 3.2.5 and every time I try to build for my device it says “No provisioned iPhone OS device is connected.” can anybody help me?

  • Lalamil1

    I got the No provisioned iPhone OS device is connected error too. How do I sign the Provisioning Profile so I can use my device

  • http://profiles.google.com/sohaib.qazi.cdz Sohaib Qazi

    It looks a very good post and tonite i will apply it on my iPhone device. It has 4.1 version installed on it. But how can i check that its jailbreak or not??? I am new to the iPhone and its development phase, So kindly tell me in detail if anyone knows…..

  • http://profiles.google.com/sohaib.qazi.cdz Sohaib Qazi

    Hi, I am getting this error.
    Code Sign error: a valid provisioning profile matching the application’s Identifier ‘com.yourcompany.iPadTreadmill’ could not be found…..

    Can someone help me to fix it……

  • Bar None

    Am using MAC OX X 10.7.1 (Lion).  I don’t see the same fields as described above.  Does anyone have the steps for setting this up in Lions OS?

  • Bar None

    I have the certificate installed, but my XCODE version is 4.1.1 and there does not seem to be a code signing section in the build tab nor am I able to find any reference to XCiPhoneOSCodeSignContext in my projects info.plist file.

    I am new to this, so maybe it is something simple I am overlooking.  

    Anyone have this working with this version of XCODE?