Skip to content

Commit 57efc1f

Browse files
abueideclaude
andcommitted
fix(ios): download specific runtime version instead of latest
Pass -buildVersion to xcodebuild -downloadPlatform so it downloads the exact runtime version requested by the device definition (e.g., iOS 26.3) rather than whatever is latest for the current Xcode (e.g., iOS 26.4). This was causing iOS E2E failures on runners with Xcode 26.4, which only ships with the iOS 26.4 beta runtime. The download command would fetch 26.4 again instead of the requested 26.3 stable runtime. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 56f6351 commit 57efc1f

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

plugins/ios/virtenv/scripts/domain/device_manager.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ resolve_runtime() {
7474
fi
7575

7676
if [ "${IOS_DOWNLOAD_RUNTIME:-1}" != "0" ] && command -v xcodebuild >/dev/null 2>&1; then
77-
echo "Preferred runtime iOS ${preferred} not found. Attempting to download via xcodebuild -downloadPlatform iOS..." >&2
78-
if xcodebuild -downloadPlatform iOS; then
77+
echo "Preferred runtime iOS ${preferred} not found. Attempting to download via xcodebuild -downloadPlatform iOS -buildVersion ${preferred}..." >&2
78+
if xcodebuild -downloadPlatform iOS -buildVersion "$preferred"; then
7979
if choice="$(pick_runtime "$preferred")"; then
8080
printf '%s\n' "$choice"
8181
return 0
8282
fi
8383
else
84-
echo "xcodebuild -downloadPlatform iOS failed; continuing with available runtimes." >&2
84+
echo "xcodebuild -downloadPlatform iOS -buildVersion ${preferred} failed; continuing with available runtimes." >&2
8585
fi
8686
fi
8787

@@ -99,14 +99,14 @@ resolve_runtime_strict() {
9999
fi
100100

101101
if [ "${IOS_DOWNLOAD_RUNTIME:-1}" != "0" ] && command -v xcodebuild >/dev/null 2>&1; then
102-
echo "Preferred runtime iOS ${preferred} not found. Attempting to download via xcodebuild -downloadPlatform iOS..." >&2
103-
if xcodebuild -downloadPlatform iOS; then
102+
echo "Preferred runtime iOS ${preferred} not found. Attempting to download via xcodebuild -downloadPlatform iOS -buildVersion ${preferred}..." >&2
103+
if xcodebuild -downloadPlatform iOS -buildVersion "$preferred"; then
104104
if choice="$(pick_runtime_strict "$preferred")"; then
105105
printf '%s\n' "$choice"
106106
return 0
107107
fi
108108
else
109-
echo "xcodebuild -downloadPlatform iOS failed." >&2
109+
echo "xcodebuild -downloadPlatform iOS -buildVersion ${preferred} failed." >&2
110110
fi
111111
fi
112112

0 commit comments

Comments
 (0)