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 9494 wget -O - $URL | tar -xz --strip-components=1 -C ~/.cargo/bin
9595 cargo dinghy --version
9696 - name : Setup Simulator
97+ # Use the first installed iOS runtime and the first (i.e. oldest) supported iPhone device.
9798 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
100106 xcrun simctl boot $SIM_ID
101107 echo "device=$SIM_ID" >> $GITHUB_ENV
102108 - uses : Swatinem/rust-cache@v2
You can’t perform that action at this time.
0 commit comments