Last active
September 25, 2018 12:11
-
-
Save a2/9bc24b2d93a3307ed64434ddf118045c to your computer and use it in GitHub Desktop.
Installs app at argument path to all booted simulators and launches them
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/sh | |
if [ "$#" -ne 1 ]; then | |
echo "$0 <path>" | |
exit 1 | |
fi | |
APP_PATH=$1 | |
BUNDLE_ID=`/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "$APP_PATH/Info.plist"` | |
for DEVICE in $(xcrun simctl list -j devices | jq --raw-output ".devices[][] | select(.state == \"Booted\") | .udid"); do | |
xcrun simctl install $DEVICE $APP_PATH && xcrun simctl launch $DEVICE $BUNDLE_ID >/dev/null & | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment