Home > Software engineering >  Azure Pipelines: How to make the Agent use a MacOS variant that has iOS version 16.1 ?
Azure Pipelines: How to make the Agent use a MacOS variant that has iOS version 16.1 ?

Time:12-29

Essentially what the subject says. I'm using agent specification 'MacOS-12' and the output of 'xcodebuild -showsdks' is this one:

    DriverKit 21.4                  -sdk driverkit21.4

iOS SDKs:
    iOS 16.0                        -sdk iphoneos16.0  <----

iOS Simulator SDKs:
    Simulator - iOS 16.0            -sdk iphonesimulator16.0

macOS SDKs:
    macOS 12.3                      -sdk macosx12.3
    macOS 12.3                      -sdk macosx12.3

tvOS SDKs:
    tvOS 16.0                       -sdk appletvos16.0

tvOS Simulator SDKs:
    Simulator - tvOS 16.0           -sdk appletvsimulator16.0

watchOS SDKs:
    watchOS 9.0                     -sdk watchos9.0

watchOS Simulator SDKs:
    Simulator - watchOS 9.0         -sdk watchsimulator9.0

On my own MacOS machine the same command gives me this:

DriverKit SDKs:
        DriverKit 22.2                  -sdk driverkit22.2

iOS SDKs:
        iOS 16.2                        -sdk iphoneos16.2 <--- this is what I want

iOS Simulator SDKs:
        Simulator - iOS 16.2            -sdk iphonesimulator16.2 

macOS SDKs:
        macOS 13.1                      -sdk macosx13.1
        macOS 13.1                      -sdk macosx13.1

tvOS SDKs:
        tvOS 16.1                       -sdk appletvos16.1

tvOS Simulator SDKs:
        Simulator - tvOS 16.1           -sdk appletvsimulator16.1

watchOS SDKs:
        watchOS 9.1                     -sdk watchos9.1

watchOS Simulator SDKs:
        Simulator - watchOS 9.1         -sdk watchsimulator9.1

CodePudding user response:

The latest Xcode is installed on the macOS 12 runners, but it's not the default yet.

You can try running:

sudo xcode-select -s /Applications/Xcode_14.2.app/Contents/Developer

As a shell command

Or use the Setup Xcode Version action.

  • Related