Skip to content

Commit c2102f4

Browse files
committed
fix: another xcode attempt
1 parent 36d6cc9 commit c2102f4

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/ci-swift.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,37 @@ jobs:
8383
- name: Select Xcode 16.3
8484
run: sudo xcode-select -s /Applications/Xcode_16.3.app
8585

86+
- name: Install iOS Simulator Runtime
87+
run: |
88+
# List available runtimes
89+
echo "Available runtimes:"
90+
xcrun simctl runtime list
91+
# Check what iOS runtimes are available with Xcode 16.3
92+
# Download and install iOS 18 runtime if not available
93+
xcodebuild -downloadPlatform iOS || true
94+
8695
- name: Select Simulator
8796
run: |
97+
# List available simulators and boot one
98+
xcrun simctl list devices available
99+
88100
# Get any available iPhone simulator (preferably newer models)
89101
UDID=$(xcrun simctl list devices available | grep -E "iPhone (1[6-9]|[2-9][0-9])" | head -1 | grep -o '[0-9A-F]\{8\}-[0-9A-F]\{4\}-[0-9A-F]\{4\}-[0-9A-F]\{4\}-[0-9A-F]\{12\}')
90102
if [ -z "$UDID" ]; then
91103
echo "No suitable iPhone simulator found!" >&2
104+
# Fallback: try to get any iPhone simulator
105+
UDID=$(xcrun simctl list devices available | grep "iPhone" | head -1 | grep -o '[0-9A-F]\{8\}-[0-9A-F]\{4\}-[0-9A-F]\{4\}-[0-9A-F]\{4\}-[0-9A-F]\{12\}')
106+
fi
107+
if [ -z "$UDID" ]; then
108+
echo "No iPhone simulator found at all!" >&2
92109
exit 1
93110
fi
94111
echo "Simulator UDID: $UDID"
112+
113+
# Boot the simulator
114+
xcrun simctl boot "$UDID" || echo "Simulator may already be booted"
115+
sleep 3
116+
95117
echo "SIMULATOR_UDID=$UDID" >> $GITHUB_ENV
96118
97119
- name: Install swiftformat

0 commit comments

Comments
 (0)