The following pipeline, when executed, will list all available Xcode versions in Azure DevOps.
trigger:
- develop
pool:
vmImage: 'macos-14'
jobs:
- job: iOS
steps:
- task: PowerShell@2
displayName: Select Xcode Version
inputs:
targetType: 'inline'
script: |
echo Mac OS version:
sw_vers -productVersion
echo Installed Xcode versions:
ls /Applications | grep 'Xcode'
echo currently selected xcode:
xcrun xcode-select --print-path
echo selecting latest xcode...
sudo xcode-select -s /Applications/Xcode_16.app
xcrun xcode-select --print-path
xcodebuild -version