Use an unsubscribed jailbroken iOS Device to test your iOS Applications for free! (No Apple Developer Subscription necessary) (iOS 2.x-7.x / Xcode 4.6.x / OS X 10.x)

  • Post published:July 29, 2013

This Tutorial shows you how to use your unsigned iOS Device to run your iOS applications without an Apple Developer subscription!

code_signing

Requirements: Xcode 4.x.x, Mac OS X, iOS 5.x-7.x

1. Jailbreak your iOS Device (http://evasi0n.com)
2. Install AppSync from Cydia (for example repo.hackyouriphone.org)
3. Connect iOS Device to Xcode and Click “Use for development” (from Xcode’s Organizer)

 

 

 

4. Create a selfsigned Codesigning certificate in Keychain Access:

  • Keychain Access” menu
  • Select “Certification Assistant” -> “Create a Certificate”
  • Name: iPhone Developer
    Identify Type: Self Signed Root
    Certification Type: Code Signing
    Check “Let me override defaults”
    Set Validity Period to 3650
    NO Email Address
    Accept everything else (Clicking Continue)

5. Configure Xcode with DEBUG

  • Close Xcode  and Open Terminal.app (Green text is code to enter)
  • cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform (version dependent here 4.6.x)
  • sudo cp -p Info.plist Info.plist.orig (create backup of file)
  • sudo plutil -convert xml1 ./Info.plist (convert to xml format)
  • sudo sed -i .bkup ‘s/XCiPhoneOSCodeSignContext/XCCodeSignContext/g’ ./Info.plist (replace strings)
    OR just replace strings “XCiPhoneOSCodeSignContext” with “XCCodeSignContext” in Info.plist with a tool you like
  • Open Xcode and Check if “Code Signing Identity” == ‘iPhone Developer” in Project Build Settings
  • Close Xcode  and Download “ldid” BINARY (OS X 10.8) or SOURCE (git://git.saurik.com/ldid.git) (recommend saving in /usr/local/bin)
  • BINARY: Use my ldid.py script (recommend saving in /usr/local/bin)
  • OR SOURCE: Create file ldid.py where ldid is saved (recommend saving in /usr/local/bin)
    ldid.py content:

#!/usr/bin/env python
from sys import argv
from subprocess import check_call
from os.path import basename, dirname, splitext, join
from tempfile import NamedTemporaryFile
app = argv[-1]
ldid_path = join(dirname(__file__), ‘ldid’)
obj_path = join(app, splitext(basename(app))[0])
if ‘-gta’ not in argv:
check_call([ldid_path, ‘-S’, obj_path])
else:
with NamedTemporaryFile(‘w+b’, 0) as f:
f.write(“””
<!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN”
“http://www.apple.com/DTDs/PropertyList-1.0.dtd”>
<plist version=”1.0″>
<dict>
<key>get-task-allow</key>
<true/>
</dict>
</plist>
“””)
f.flush()
check_call([ldid_path, ‘-S’ + f.name, obj_path])

  • SOURCE & BINARY User:
  • sudo chmod +x ldid
  • sudo chmod +x ldid.py
  • cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Specifications
  • sudo cp -p iPhoneCodeSign.xcspec iPhoneCodeSign.xcspec.orig (backup)
  • sudo plutil -convert xml1 iPhoneCodeSign.xcspec (convert to xml)
  • sudo sed -i .bkup ‘s/\/usr\/bin\/codesign/\/usr\/local\/bin\/ldid.py/g’ iPhoneCodeSign.xcspec (replaces strings !! change path to yours [recommended was /usr/local/bin/])
    OR just replace string code sign” here
    <key>CommandLine</key><string>codesign</string>
     with “/usr/local/bin/ldid.py” in iPhoneCodeSign.xcspec with a tool you like
  • Open Xcode  and Enable debugging in Xcode: add “-gta” to “Other Code Signing Flags”

Thats it! HF