Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

10x learner
10x learner

Posted on • Originally published at10xlearner.com on

     

How to specify your Xcode version on Appveyor

Hello ! I’m Xavier Jouvenot and in this small post, I am going to explain how to specify your Xcode version on Appveyor.

Self promotion: You can find other articles on computer science and programming on mywebsite 😉

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 Appveyor process, before trying to compile anything:

build_script:  - sudo xcode-select -s /Applications/Xcode-<version_number>.app
Enter fullscreen modeExit fullscreen mode

So, for example, if you want to select the version13.1 of Xcode on Appveyor, then, it would look like that:

build_script:  - sudo xcode-select -s /Applications/Xcode-13.1.app
Enter fullscreen modeExit fullscreen mode

If you are not sure about the version of Xcode you are actually using on Appveyor, you can always look to thedocumentation, or you can add the following step to you process and see the information directly in Appveyor:

build_script:  - sudo xcode-select -p
Enter fullscreen modeExit fullscreen mode

Diving deeper with concrete examples

To make sure that, even in the future, you have working examples to look at, I have made aGitHub repository with an Appveyor process for each version of Xcode present on each OSX virtual environment available.

In theappveyor.yml file at the root of the repository, you will see jobs set up for each OSX environment using amatrix, running ashell script in a dedicated folder which selects each version of XCode available and print it once it has been selected.

Xcode jobs in Appveyor

Xcode job details in Appveyor

I will maintain those Appveyor processes when Appveyor Systems Inc. will update their environment images, so that we will always be able to use this repository as reference! So if you see a version of Xcode or an version of OSX missing, do not hesitate to create a new issue 😉


Thank you all for reading this article,

And until my next article, have a splendid day 😉

Interesting links

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

  • Location
    Bordeaux
  • Education
    Master Degree
  • Work
    Lead Quality Software Engineer at Expressivee
  • Joined

More from10x learner

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp