# Azure DevOps: force the use of a specific Xcode version

> Azure DevOps is the ideal partner for automating builds and releases of our Xamarin iOS applications. When creating an iOS build, a good practice is to specify…

- Author: Jérôme Giacomini
- Language: en
- Canonical URL: [Azure DevOps: force the use of a specific Xcode version](https://jeromegiacomini.net/articles/2019/12/02/azure-devops-force-the-use-of-a-specific-xcode-version)
- Published: 2019-12-02
- Last modified: 2026-09-05
- Topics: .NET, Azure, DevOps, Xamarin

Azure DevOps is the ideal partner for automating builds and releases of our Xamarin iOS applications. When creating an iOS build, a good practice is to specify which version of Xcode it should target. Otherwise if the agent is updated with new versions of Xcode the build may be altered.

The problem is that **there is no dedicated task** for selecting the Xcode version.

So we are going to create a dedicated Bash task ourselves.
From the definition of your build:
click **Add Tasks**, then select a **Bash** task.

![](https://jeromegiacomini.net/Blog/wp-content/uploads/2019/11/image.png)

Once the task is created, you must:
 Give him one **Display name**
– Select the type: **Inline**

![](https://jeromegiacomini.net/Blog/wp-content/uploads/2019/11/image-1.png)

And finally add the following code to the script field:

```bash

#!/bin/bash

/bin/bash -c "echo '##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]'/Applications/Xcode_10.1.app;sudo xcode-select --switch /Applications/Xcode_10.1.app/Contents/Developer"
```


If you're interested in other tricks for iOS I'd recommend [this very good article](https://blogs.infinitesquare.com/posts/mobile/ios-ne-plus-avoir-a-dire-que-votre-app-ne-fait-pas-de-cryptography-sur-itunes-connect).

Happy coding 🙂
