File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -29,29 +29,40 @@ while [[ $# -gt 0 ]]; do
2929done
3030
3131SIMULATOR=" iPhone 16"
32+ IOS_VERSION=" 18.5"
3233
3334# Select simulator based on Xcode version
3435case " $XCODE_VERSION " in
3536 " 14.3.1" )
3637 SIMULATOR=" iPhone 14"
38+ IOS_VERSION=" 16.4"
3739 ;;
3840 " 15.4" )
3941 SIMULATOR=" iPhone 15"
42+ IOS_VERSION=" 17.5"
4043 ;;
4144 " 16.2" )
4245 SIMULATOR=" iPhone 16"
46+ IOS_VERSION=" 18.5"
4347 ;;
4448 * )
4549 SIMULATOR=" iPhone 16" # Default fallback
50+ IOS_VERSION=" 18.5"
4651 ;;
4752esac
4853
49- echo " Booting simulator $SIMULATOR "
50- xcrun simctl boot " $SIMULATOR "
54+ UDID=$( xcrun simctl list devices available | \
55+ grep -A 5 " ^-- iOS $IOS_VERSION --" | \
56+ grep " $SIMULATOR (" | \
57+ sed -n ' s/.*(\([0-9A-F-]\{36\}\)).*/\1/p' | \
58+ head -n1)
59+
60+ echo " Booting simulator $SIMULATOR - iOS $IOS_VERSION : $UDID "
61+ xcrun simctl boot " $UDID "
5162
5263# Wait for the simulator to boot
5364# We need to wait for the simulator to boot to avoid the test to fail due to timeout (because the simulator is not booted yet)
54- xcrun simctl bootstatus " $SIMULATOR "
65+ xcrun simctl bootstatus " $UDID "
5566
5667# Print details about the booted simulator, iOS version, etc.
5768xcrun simctl list devices --json | jq ' .devices | to_entries[] | select(.value[] | .state == "Booted")'
You can’t perform that action at this time.
0 commit comments