Advertisement
BigRob154

Cordova / Ionic build script auto deploy on device via XCode

Sep 10th, 2015
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.71 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. clear
  4.  
  5. # Want some text 2 speech? uncomment the following line :D
  6. # say -v "Ava" "Building Cordova"
  7.  
  8. cordova build ios 1>/dev/null 2>&1
  9. cd platforms/ios
  10.  
  11. # hint:
  12. # delete "1>/dev/null 2>&1" when you want all the output from XCode
  13. xcodebuild -project YOUR_APP.xcodeproj -scheme YOUR_APP -destination name="YOUR_DEVICE_NAME" clean 1>/dev/null 2>&1
  14.  
  15. open *.xcodeproj
  16.  
  17. # automate XCode
  18. osascript <<EOD
  19.     delay 1
  20.     tell application "Xcode"
  21.         activate
  22.     end tell
  23.     delay 1
  24.     tell application "System Events"
  25.         key down {command}
  26.         keystroke "."
  27.         key up {command}
  28.         key down {command}
  29.         keystroke "r"
  30.         key up {command}
  31.     end tell
  32. EOD
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement