Home > Net >  How to update XCODE version to 13.4.1 in Azure Pipeline?
How to update XCODE version to 13.4.1 in Azure Pipeline?

Time:09-01

I am deploying application using azure pipeline getting below error

module compiled with Swift 5.6.1 cannot be imported by the Swift 5.5.

I have tried changing configurations but no luck, any help will be thankful

Locale machine File and configurations

  • MacOS 12.5.1
  • Xcode version is 13.4.1

Azure executing below version of xcode

  • Xcode 13.2.1

.yml file

trigger:
- main

  pool:
   vmImage: 'macOS-latest'

  variables:
  - group: App Variables

 steps:
- task: NodeTool@0
  inputs:
      versionSpec: '12.19.0'
  displayName: 'Install Node.js'

- script: yarn install
  displayName: Install Dependencies

- task: CocoaPods@0
  inputs:
      workingDirectory: ios
      forceRepoUpdate: false
      displayName: 'Install CocoaPods dependencies'

- task: Xcode@5
  inputs:
      actions: 'build'
      configuration: 'Release'
      sdk: 'iphoneos15.2'
      xcWorkspacePath: 'ios/EsApp.xcworkspace'
      scheme: 'EsApp'
      packageApp: true
      archivePath: 'output/archive'
      exportPath: 'output/package'
      exportOptions: plist
      exportOptionsPlist: 'ios/ExportOptions.plist'

CodePudding user response:

According to your description, this problem is related to the XCODE version of the Microsoft-hosted agent, in the "macOS-latest" is using the "macOS 11 Big Sur" image, and it supports the highest XCODE version is 13.2.1.

You could use the "macOS-12" Microsoft-hosted agent to use the XCODE 13.4.1.

  pool:
   vmImage: 'macOS-12'

For more information about software of Microsoft-hosted agent, you could refer to this.

  • Related