From 054a023142f9dbd6b252e36d5a66bb9642283a7b Mon Sep 17 00:00:00 2001 From: Ammar Ahmed Date: Wed, 22 Jul 2026 10:13:16 +0500 Subject: [PATCH] ci: fix intermittent ios preview build failure --- .github/workflows/ios.preview.build.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ios.preview.build.yml b/.github/workflows/ios.preview.build.yml index 4228b5a63..d5027dfcb 100644 --- a/.github/workflows/ios.preview.build.yml +++ b/.github/workflows/ios.preview.build.yml @@ -42,10 +42,16 @@ jobs: with: xcode-version: "26.1.1" - - name: Setup iOS Platform + - name: Ensure iOS SDK is available run: | - xcodebuild -downloadPlatform iOS -exportPath ~/Downloads - xcodebuild -importPlatform ~/Downloads/iphonesimulator_26.1_23B86.dmg + set -euo pipefail + if xcodebuild -showsdks | grep -q iphoneos; then + echo "iOS device SDK present:" + xcodebuild -showsdks | grep iphoneos + else + echo "iOS device SDK missing; downloading platform..." + xcodebuild -downloadPlatform iOS + fi - name: Install node modules run: |