iosazure-devopscontinuous-integrationyaml

ios azure pipeline build fails with build with error no team ID found in the archive


I am using azure pipeline to create CI for iOS and my repository depend on swift code and after running the build I got this error in the Xcode archive task

Error Domain=IDEFoundationErrorDomain Code=1 "No 'teamID' specified and no team ID found in the archive" UserInfo={NSLocalizedDescription=No 'teamID' specified and no team ID found in the archive}

I am using arg in the Xcode archive tasks

steps:
- task: Xcode@5
  displayName: 'Xcode archive'
  inputs:
    actions: archive
    xcWorkspacePath: '*.xcworkspace'
    scheme: '$(SchemeName)'
    packageApp: true
    args: '-UseModernBuildSystem=0  '

Solution

  • You might need to set the exportOptions to specify and set the attributes teamId and exportMethod for Xcode task. See below example:

    steps:
    - task: Xcode@5
      displayName: 'Xcode archive'
      inputs:
        actions: archive
        xcWorkspacePath: '*.xcworkspace'
        scheme: '$(SchemeName)'
        packageApp: true
        args: '-UseModernBuildSystem=0'
        exportOptions: 'specify'
        exportMethod: 'app-store'
        teamId: "Team Id" 
        exportTeamId: "Team Id"
    

    See here for more information about xcode task.