Skip to content

Instantly share code, notes, and snippets.

@thevirtuoso1973
Created August 7, 2020 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thevirtuoso1973/fd25d5ad900bfb0ee09561481df24459 to your computer and use it in GitHub Desktop.
Save thevirtuoso1973/fd25d5ad900bfb0ee09561481df24459 to your computer and use it in GitHub Desktop.
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