From 2ff087f9f058ecb39538bf8dfeb368c7b86d4f6a Mon Sep 17 00:00:00 2001 From: Yibo Zhuang Date: Mon, 21 Sep 2026 23:00:39 -0700 Subject: [PATCH] Download legacy iOS runtimes before selecting latest Xcode (#384) --- templates/xcode.pkr.hcl | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/templates/xcode.pkr.hcl b/templates/xcode.pkr.hcl index 36dfa86..e5d2d3d 100644 --- a/templates/xcode.pkr.hcl +++ b/templates/xcode.pkr.hcl @@ -191,14 +191,7 @@ build { } } - provisioner "shell" { - inline = [ - "source ~/.zprofile", - "sudo xcode-select -s /Applications/Xcode_${var.xcode_version[0]}.app/Contents/Developer", - "xcodebuild -downloadAllPlatforms", - ] - } - + // Download legacy iOS runtimes before selecting the newest Xcode. provisioner "shell" { inline = concat( ["source ~/.zprofile"], @@ -208,6 +201,14 @@ build { ) } + provisioner "shell" { + inline = [ + "source ~/.zprofile", + "sudo xcode-select -s /Applications/Xcode_${var.xcode_version[0]}.app/Contents/Developer", + "xcodebuild -downloadAllPlatforms", + ] + } + provisioner "shell" { inline = concat( ["source ~/.zprofile"],