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"],