Skip to content

Instantly share code, notes, and snippets.

@itguy51
Created May 27, 2014 05:20
Show Gist options
  • Save itguy51/8be1feafb58359a06eb3 to your computer and use it in GitHub Desktop.
Save itguy51/8be1feafb58359a06eb3 to your computer and use it in GitHub Desktop.
Jailbreak SSH+Open solution for iOS Development
#!/bin/sh
#Build iOS app, sling and run.
#Cuz why the hell not?
#Set HOSTNAME_IOS to the iPhone/iPad/iPod's IP address
#Ensure you have open and OpenSSH with key-based auth configured.
#Add this as the last BUILD STEP
#Have ldid in ~/
HOSTNAME_IOS=192.168.1.81
KILLCOMMAND="killall ${EXECUTABLE_NAME}"
RMCOMMAND="rm -r /Applications/${EXECUTABLE_NAME}.app"
ssh root@${HOSTNAME_IOS} $KILLCOMMAND
ssh root@${HOSTNAME_IOS} $RMCOMMAND
~/ldid -S ${TARGET_BUILD_DIR}/${EXECUTABLE_NAME}.app/${EXECUTABLE_NAME}
scp -r ${TARGET_BUILD_DIR}/${EXECUTABLE_NAME}.app root@${HOSTNAME_IOS}:/Applications/
COMMAND="chmod +x /Applications/${EXECUTABLE_NAME}.app/${EXECUTABLE_NAME}"
ssh root@${HOSTNAME_IOS} $COMMAND
ssh root@${HOSTNAME_IOS} "su mobile -c uicache"
OPENCMD="open newproject.${TARGET_NAME}"
ssh root@${HOSTNAME_IOS} $OPENCMD
@itguy51
Copy link
Author

itguy51 commented May 27, 2014

Couple of notes -
Set your bundle's first half on line 18 - change newproject to whatever your company ID is.
Change HOSTNAME_IOS
MAKE ONE-HUNDRED PERCENT SURE you've configured key-based auth for your device. (Also, change the default password. Be secure!)
I tried to make this script as project-agnostic as I could.
All of the tweaks you'll need to make are generally a once-off thing. (And you deploy without wires. Show those licensed developers what's what!)

Standard Stuff -
Have ldid in ~/.
Disable Code Signing Requirement in the plist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment