Skip to content

Instantly share code, notes, and snippets.

@mdnmdn
Last active August 29, 2015 14:12
Show Gist options
  • Save mdnmdn/888b17c83d7adc05fb17 to your computer and use it in GitHub Desktop.
Save mdnmdn/888b17c83d7adc05fb17 to your computer and use it in GitHub Desktop.
Xcode6 - Jailbroken deploy iOS

Compile and deploy iOS App

Configure XCode6

Based on:

Steps:

  1. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Info.plist

    Change DefaultProperties/CODE_SIGN_CONTEXT_CLASS XCiPhoneOSCodeSignContext => XCCodeSignContext

  2. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/SDKSettings.plist

    DefaultProperties/ENTITLEMENTS_REQUIRED: NO (try YES if not working) DefaultProperties/CODE_SIGNING_REQUIRED: NO DefaultProperties/AD_HOC_CODE_SIGNING_ALLOWED: YES

  3. Restart XCode (if already running)

  4. Create new project

  5. Create new file in the root folder: Entitlements.plist Add new property: Can be debugged: YES (boolean)

  6. Open project preferences -> Build Settings -> All -> Code Signing (pay attention to select in the target combo the entire project and not a single target)

  7. Set for Code Signing Entitlements (both Release/Debug): Entitlements.plist

  8. Set for Code Signing Identity (all 5 nodes): Ad Hoc Code Sign

  9. Build

Deploy on jailbroken the device

Based on:

Prerequisites:

The device should run sshd.

Download and install ldid:

# http://iphonedevwiki.net/index.php/Xcode
git clone git://git.saurik.com/ldid.git
cd ldid
git submodule update --init
./make.sh
cp ldid /usr/local/bin/

Deploy App

# Add the SHA1 hashes
ldid -S ~/Library/Developer/Xcode/DerivedData/Hello-dybwbcfbgisyaagzfrputzjpcfab/Build/Products/Debug-iphoneos/Hello.app/Hello

# Set the app as executable
chmod +x  ~/Library/Developer/Xcode/DerivedData/Hello-dybwbcfbgisyaagzfrputzjpcfab/Build/Products/Debug-iphoneos/Hello.app/Hello

# copy app to the device (pwd: alpine)
scp -r ~/Library/Developer/Xcode/DerivedData/Hello-dybwbcfbgisyaagzfrputzjpcfab/Build/Products/Debug-iphoneos/Hello.app root@192.168.1.77/Applications/

# update the ui cache
ssh root@192.168.1.77 "su mobile -c uicache"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment