Created
August 7, 2020 15:42
-
-
Save thevirtuoso1973/fd25d5ad900bfb0ee09561481df24459 to your computer and use it in GitHub Desktop.
Automate T1 Device Testing
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
#!/usr/bin/env bash | |
set -euo pipefail | |
cd ~/Documents/Code/Work/lner-app/iosApp | |
function testPhone() { | |
# Expects two arguments: | |
name=$1 | |
version=$2 | |
echo "Building for $name" | |
xcodebuild -workspace LNER.xcworkspace \ | |
-scheme "LNER Dev" \ | |
-configuration Dev \ | |
-destination "platform=iOS Simulator,name=$name,OS=$version" \ | |
-derivedDataPath build \ | |
-quiet | |
xcrun simctl boot "$name" | |
xcrun simctl install \ | |
"$name" \ | |
./build/Build/Products/Dev-iphonesimulator/LNER.app | |
xcrun simctl launch "$name" uk.co.icectoc.customer.dev | |
read -p "Press any key when finished with the $name: " | |
xcrun simctl shutdown "$name" | |
} | |
# iPhone 11 Pro Max | |
testPhone "iPhone 11 Pro Max" "13.6" | |
# iPhone 7 | |
testPhone "iPhone 7" "12.0" | |
# iPhone 7 Plus | |
testPhone "iPhone 7 Plus w/ 13.3" "13.3" | |
# iPhone SE | |
testPhone "iPhone SE (1st generation)" "12.0" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment