【问题标题】:ios azure pipeline build fails with build with error no team ID found in the archiveios azure 管道构建失败并出现错误在存档中找不到团队 ID
【发布时间】:2020-12-02 23:00:37
【问题描述】:

我正在使用 azure 管道为 iOS 创建 CI,我的存储库依赖于 swift 代码,运行构建后,我在 Xcode 存档任务中收到此错误

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}

我在 Xcode 归档任务中使用 arg

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

【问题讨论】:

  • 如果您想创建存档,则需要提供配置文件,可能还需要提供签名身份。
  • 我尝试提供配置文件和可能的签名身份,但它是相同的
  • 那么你应该edit你的问题来显示你的yaml文件的更多内容。您需要将配置文件作为安全文件上传并使用InstallAppleProvisioningProfile@1 使其可用于您的管道。
  • 好的,我现在就去

标签: ios azure-devops continuous-integration yaml


【解决方案1】:

您可能需要设置exportOptions 来为Xcode 任务指定和设置属性teamIdexportMethod。见下例:

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"

有关 xcode 任务的更多信息,请参阅here

【讨论】:

    【解决方案2】:

    安装证书和配置文件

    要对您的应用程序进行签名,您需要安装我们已作为 Secure-Files 导入 Azure 仪表板的证书和配置文件

    - task: InstallAppleCertificate@2
      inputs:
        # Select the certificate (.p12) that was uploaded to Secure Files to install on the macOS agent.
        certSecureFile: 'Certificate.p12' 
        # Password to the Apple certificate (.p12). Use a new build variable with its lock enabled on the Variables tab to encrypt this value.
        certPwd: '$(P12password)'
        # Select the keychain in which to install the Apple certificate. You can choose to install the certificate in a temporary keychain (default), the default keychain or a custom keychain. A temporary keychain will always be deleted after the build or release is complete.
        keychain: 'temp'
        # Select to delete the certificate from the keychain after the build or release is complete. This option is visible when custom keychain or default keychain are selected.
        deleteCert: true
    
    - task: InstallAppleProvisioningProfile@1
      inputs:
      # Select the location of the provisioning profile to install. The provisioning profile can be uploaded to Secure Files or stored in your source repository or a local path on the agent.
        provProfileSecureFile: 'my-provisioning-profile.mobileprovision'
    

    【讨论】:

      猜你喜欢
      • 2019-02-22
      • 2020-01-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-19
      相关资源
      最近更新 更多