Skip to content

Instantly share code, notes, and snippets.

Embed
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:
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