Member-only story
How to specify your Xcode version on Azure Pipelines
Hello ! I’m Xavier Jouvenot and in this small post, I am going to explain how to specify your Xcode version on Azure Pipelines.
Self promotion: You can find other articles on computer science and programming on my website 😉
Problematic
If you have CI/CD processes or if you want to create some for your project, then it may be wise to make sure that you can always compile your project using the same version of Xcode as the one you are using on your machine, or the one used by your development team.
Another use case where specifying a version of Xcode can be very useful, is to upgrade the version you, and/or your dev team, are actually using. Indeed, by specifying a newer version of Xcode in your CI/CD configuration, you can make sure everything works with the new version before asking everybody to upgrade the version of Xcode on their machine, and have a smooth transition.
Solution
The short answer, for the people who don’t want to read through the entire article (I know you do that! I do it too 😆) is to insert the following setup in your Azure Pipelines process, before trying to compile anything:
- script: |
sudo xcode-select -s /Applications/Xcode_<version_number>.app
displayName: Selects a specific version of Xcode
So, for example, if you want to select the version 13.1
of Xcode on Azure Pipelines, then, it would look like…