Skip to content

Commit 5d0cf20

Browse files
authored
chore: fix a simulator name error (#363)
1 parent 3bd4e35 commit 5d0cf20

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ jobs:
6868
branches:
6969
only:
7070
- master
71-
env: SCHEME=OptimizelySwiftSDK-iOS TEST_SDK=iphonesimulator PLATFORM='iOS Simulator' OS=12.1 NAME='iPhone 7'
72-
name: PLATFORM='iOS Simulator' OS=13.2 NAME='iPhone X'
71+
env: SCHEME=OptimizelySwiftSDK-iOS TEST_SDK=iphonesimulator PLATFORM='iOS Simulator' OS=13.3 NAME='iPhone 11'
72+
name: PLATFORM='iOS Simulator' OS=13.3 NAME='iPhone 11'
7373
install:
7474
- gem install slather --no-document --quiet
7575
- gem install cocoapods -v '1.8.0'

Scripts/start_simulator.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,12 @@ set -eou pipefail
99
# prep jq arg because it doesnt allow parameter expansion within its single quotes
1010
echo ".devices.\"com.apple.CoreSimulator.SimRuntime.${PLATFORM/ Simulator/}-${OS/./-}\"" > /tmp/jq_file
1111

12-
xcrun simctl boot $( xcrun simctl list --json devices | jq -f /tmp/jq_file | jq -r '.[] | select(.name==env.NAME) | .udid' ) && sleep 30
12+
simulator=$( xcrun simctl list --json devices | jq -f /tmp/jq_file | jq -r '.[] | select(.name==env.NAME) | .udid' )
13+
if [ -z $simulator ]; then
14+
echo "The requested simulator ($PLATFORM $OS $NAME) cannot be found."
15+
xcrun instruments -s device
16+
exit 1
17+
fi
18+
19+
xcrun simctl boot $simulator && sleep 30
1320
xcrun simctl list | grep Booted

0 commit comments

Comments
 (0)