File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 94
94
wget -O - $URL | tar -xz --strip-components=1 -C ~/.cargo/bin
95
95
cargo dinghy --version
96
96
- name : Setup Simulator
97
+ # Use the first installed iOS runtime and the first (i.e. oldest) supported iPhone device.
97
98
run : |
98
- RUNTIME_ID=$(xcrun simctl list runtimes | grep iOS | cut -d ' ' -f 7 | tail -1)
99
- SIM_ID=$(xcrun simctl create My-iphone7 com.apple.CoreSimulator.SimDeviceType.iPhone-7 $RUNTIME_ID)
99
+ RUNTIME=$(xcrun simctl list runtimes --json | jq '.runtimes | map(select(.name | contains("iOS"))) | .[0]')
100
+ RUNTIME_ID=$(echo $RUNTIME | jq -r '.identifier')
101
+ echo "Using runtime:" $RUNTIME_ID
102
+ DEVICE_ID=$(echo $RUNTIME | jq -r '.supportedDeviceTypes | map(select(.productFamily == "iPhone")) | .[0].identifier')
103
+ echo "Using device:" $DEVICE_ID
104
+ SIM_ID=$(xcrun simctl create Test-iPhone $DEVICE_ID $RUNTIME_ID)
105
+ echo "Created simulator:" $SIM_ID
100
106
xcrun simctl boot $SIM_ID
101
107
echo "device=$SIM_ID" >> $GITHUB_ENV
102
108
- uses : Swatinem/rust-cache@v2
You can’t perform that action at this time.
0 commit comments