Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Automate T1 Device Testing
#!/usr/bin/env bash
set -euo pipefail
cd ~/Documents/Code/Work/lner-app/iosApp
function testPhone() {
# Expects two arguments:
echo "Building for $name"
xcodebuild -workspace LNER.xcworkspace \
-scheme "LNER Dev" \
-configuration Dev \
-destination "platform=iOS Simulator,name=$name,OS=$version" \
-derivedDataPath build \
xcrun simctl boot "$name"
xcrun simctl install \
"$name" \
xcrun simctl launch "$name"
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