File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,20 +58,29 @@ jobs:
5858
5959 RUNTIME_ID=$(
6060 xcrun simctl list runtimes available \
61- | sed -n 's/.*(\( com\.apple\.CoreSimulator\.SimRuntime\.iOS-[^)]*\) ).*/\1/p' \
61+ | sed -nE 's/.*- ( com\.apple\.CoreSimulator\.SimRuntime\.iOS-[[:alnum:]-]+ ).*/\1/p' \
6262 | tail -n 1
6363 )
6464
65+ if [[ -z "${RUNTIME_ID:-}" ]]; then
66+ # Fallback for alternate simctl output formats.
67+ RUNTIME_ID=$(
68+ xcrun simctl list runtimes available \
69+ | sed -nE 's/.*\((com\.apple\.CoreSimulator\.SimRuntime\.iOS-[^)]*)\).*/\1/p' \
70+ | tail -n 1
71+ )
72+ fi
73+
6574 DEVICE_TYPE_ID=$(
6675 xcrun simctl list devicetypes \
67- | sed -n 's/.*iPhone 16.*(\( com\.apple\.CoreSimulator\.SimDeviceType\.[^)]*\) ).*/\1/p' \
68- | head -n 1
76+ | sed -nE 's/.*iPhone 16.*\(( com\.apple\.CoreSimulator\.SimDeviceType\.[^)]*)\ ).*/\1/p' \
77+ | tail -n 1
6978 )
7079
7180 if [[ -z "${DEVICE_TYPE_ID:-}" ]]; then
7281 DEVICE_TYPE_ID=$(
7382 xcrun simctl list devicetypes \
74- | sed -n 's/.*iPhone.*(\( com\.apple\.CoreSimulator\.SimDeviceType\.[^)]*\) ).*/\1/p' \
83+ | sed -nE 's/.*iPhone.*\(( com\.apple\.CoreSimulator\.SimDeviceType\.[^)]*)\ ).*/\1/p' \
7584 | head -n 1
7685 )
7786 fi
You can’t perform that action at this time.
0 commit comments