Created
January 27, 2015 19:42
-
-
Save DavidFrahm/3d70aecf698ae6e3f350 to your computer and use it in GitHub Desktop.
Ionic app build and choose iOS Simulator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Building Ionic/Cordova iOS release..." | |
ionic build --release ios | |
export DEVICES=`ios-sim showdevicetypes 2>&1` | |
export DEVICES=\"`echo $DEVICES | sed -e 's/ com./" "com./g' | sed -e 's/, /,~/g'`\" | |
PS3='Please enter your choice: ' | |
options=($DEVICES) | |
app="`find ./platforms/ios/build/emulator/ -name *.app -print`" | |
escaped_app="\"$app\"" | |
echo $app | |
select opt in "${options[@]}" | |
do | |
case $opt in | |
*) echo ios-sim launch "$escaped_app" --devicetypeid "`echo $opt | sed -e "s/~/ /g"`" --stderr ./platforms/ios/cordova/console.log --stdout ./platforms/ios/cordova/console.log > ~emulate-ios.tmp;chmod +x ~emulate-ios.tmp;./~emulate-ios.tmp;rm ~emulate-ios.tmp;exit; | |
esac | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment