Friday, September 21, 2012

Install apps on devices without certificate


         As you know to distribute the applications in App Store or even to debug them on real device according to Apple you have to pay $99 to achieve the provisiong and distribution certificate.But of course as you know, there are always other ways to achieve the similar result. But 1st. your device has to be jailbroken and 2nd. you can distribute your app only among jailbroken devices via Cydia, Icy or less friendly through SSH. It has advantages and disadvantage. Not all iPhones and iPod touches are jailbroken (I guess maybe 10% are), but you don’t have to obey the rules from Apple about submitted apps and you don’t have to wait at least one week for the review result.

Tasks you need to do only once (for developer):

  1. Jailbreak your iPhone
  2. Install LDID (Link Identity Editor), Mobile Termial and OpenSSH from Cydia
  3. Go to /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.sdk/
    I personally tested in on 3.0 that’s why I put that in bold, if you are going to built your app on a higher SDK, go to the appropriate directory.
  4. Open the SDKSettings.plist in your favorite editor (I recommend Property List Editor in Utilities) and in Root -> DefaultProperties set CODE_SIGNING_REQUIRED = NO. BTW check ifAD_HOC_CODE_SIGNING_ALLOWED equals NO and CODE_SIGNING_ENTITLEMENTS is blank.
  5. Save the file.

Please remember: modification of above .plist file simply allows you to build the package without signing it, so from now, you are able both to built package for Cydia and AppStore submission. Of course for App Store submission you provide a Distribution profile, for Cydia “Don’t Code Sign” in your project info under BuildCode SigningCode Signing IdentityAny iPhone OS Device.


Tasks you need to do for every package (developer):

  1. Build your project without signing it (Don’t Code Sign).
  2. SSH your bundle to /Applications on your device. You can use Fugu for Mac or  WinSCP for Windows.
  3. Now you have to fake-sign it to make it working. Open Mobile Terminal and type:
    su root
    you will be asked for password, by default: alpine. Next:
    ldid -S /Applications/My\ Project\ Name.app/My\ Project\ Name
    make sure every space in name comes with the backslash before
  4. If any error occurs, it means that you have provided wrong file path or didn’t built it with “Don’t Code Sign”.
  5. Now you can test your application, how it works on real device with full touch control, accelerometer and device’s performance, it’s really different from the Simulator.
  6. If everything works correctly download the file that you modified with ldid – it’s the file named exactly the same as your project without any extensions, and replace it with original from your bundle.
  7. Now you can distribute it in your own way.


No comments:

Post a Comment

Post a Comment