File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,27 @@ steps:
8686 xcrun xcode-select --print-path
8787 xcodebuild -version
8888 sudo xcodebuild -license accept
89- sudo xcodebuild -downloadPlatform iOS -buildVersion 26.0 -architectureVariant universal
89+ # if we're using Xcode 26.0[.?], then explicitly install the iOS 26.0 simulator (the iOS 26.0.1 simulator doesn't work for us)
90+ # also install the universal simulator version, so that this bot can run x64 apps in the simulator.
91+ if [[ "$(REQUIRED_XCODE)" =~ ^26[.]0.*$ ]]; then
92+ if ! sudo xcodebuild -downloadPlatform iOS -architectureVariant universal -buildVersion 26.0; then
93+ echo "Failed to install simulator runtime, deleting all simulator runtimes and trying again..."
94+ sudo xcrun simctl runtime delete all
95+ # simulator runtimes are deleted asynchronously, so wait until they're all gone (but max 60 seconds)
96+ for i in $(seq 1 60); do
97+ sleep 1
98+ C=$(xcrun simctl runtime list -j | jq '. | length')
99+ if [[ $C == 0 ]]; then
100+ echo " still $C simulators left..."
101+ break
102+ fi
103+ done
104+ echo "Re-trying simulator runtime installation"
105+ sudo xcodebuild -downloadPlatform iOS -architectureVariant universal -buildVersion 26.0
106+ fi
107+ else
108+ sudo xcodebuild -downloadPlatform iOS -architectureVariant universal
109+ fi
90110 sudo xcodebuild -runFirstLaunch
91111 displayName: Select Xcode Version
92112 condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
You can’t perform that action at this time.
0 commit comments