Azure DevOps管道集成iOS错误:(xcodebuild失败,返回代码:65)

4

我正在尝试为Flutter iOS创建CI/CD流水线。

我期望得到一个已签名的.ipa文件。

在尝试签名时,我在Xcode@5任务中遇到了错误。

以下是我的流水线任务:

- task: InstallAppleCertificate@2
  displayName: "Install Apple p12 cert"
  inputs:
    certSecureFile: "app.p12"
    certPwd: "$(certpassword)"
    keychain: "temp"

- task: InstallAppleProvisioningProfile@1
  displayName: "Install Apple Mobile Provisioning Profile"
  inputs:
    provisioningProfileLocation: "secureFiles"
    provProfileSecureFile: "app.mobileprovision"

- task: Xcode@5
  displayName: "Code Sign ipa for Distribution"
  inputs:
    actions: "build"
    scheme: "Runner"
    sdk: "$(sdk)"
    configuration: "$(configuration)"
    xcWorkspacePath: "ios/Runner.xcworkspace"
    xcodeVersion: "default"
    packageApp: true
    signingOption: "manual"
    signingIdentity: "$(APPLE_CERTIFICATE_SIGNING_IDENTITY)"
    provisioningProfileUuid: "$(APPLE_PROV_PROFILE_UUID)"

在 Xcode 任务中出现以下错误:

{ platform: iOS Simulator, id:C5BCE86E-E6C0-4E64-AE49-005808F2918E, OS:16.0, name: iPhone 11 Pro Max }
{ platform: iOS Simulator, id:63A63B15-4DBA-41CC-B2A4-373DE87483F2, OS:16.0, name: iPhone 12 }
{ platform:iOS Simulator, id:109D2750-4DB7-4723-85A6-2F446F38CAE7, OS:16.0, name: iPhone 12 Pro }
{ platform:iOS Simulator, id:C07FB95C-CDF1-485D-AB69-52AA17323958, OS:16.0, name: iPhone 12 Pro Max }
{ platform:iOS Simulator, id:74A7A1DC-39F0-4DF9-920B-D37A10F8809F, OS:16.0, name: iPhone 12 mini }
{ platform:iOS Simulator, id:C34176C6-5E17-4A67-846F-023FAA893238, OS:16.0, name: iPhone 13 }
{ platform:iOS Simulator, id:D39E5CB7-108C-4F23-ACF3-C3AB576E160A, OS:16.0, name: iPhone 13 Pro }
{ platform:iOS Simulator, id:7A2F0E11-F5D0-4939-B52B-3E47408C027E, OS:16.0, name: iPhone 13 Pro Max }
{ platform:iOS Simulator, id:707D3B43-AA06-41C2-92A1-500A608C6525, OS:16.0, name: iPhone 13 mini }
{ platform:iOS Simulator, id:E67DAAAB-AF35-4922-9CA6-04030A5566FA, OS:16.0, name: iPhone 14 }
{ platform:iOS Simulator, id:BE0F9CD6-EF7B-4550-B098-AB47F8E58C95, OS:16.0, name: iPhone 14 Plus }
{ platform:iOS Simulator, id:A2D88E3C-A916-4345-B20D-CF39E3F4D076, OS:16.0, name: iPhone 14 Pro }
{ platform:iOS Simulator, id:F6D2C7E3-B6D4-464C-A931-33DC57689DA5, OS:16.0, name: iPhone 14 Pro Max }
{ platform:iOS Simulator, id:DC572178-ED3D-4F57-9297-70D751A2797F, OS:16.0, name: iPhone SE (2nd generation) }
{ platform:iOS Simulator, id:E7631040-2CCB-447E-8F39-120F8C714735, OS:16.0, name: iPhone SE (3rd generation) }
    Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Runner' from project 'Runner')
    Run script build phase 'Thin Binary' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Runner' from project 'Runner')
** BUILD FAILED **

##[error]Error: /usr/bin/xcodebuild failed with return code: 65

有没有解决办法?我已经遇到同样的问题几个星期了。 - AMAN77
1
有解决办法吗?我已经遇到同样的问题好几个星期了。 - AMAN77
1
有没有解决办法?我已经遇到同样的问题好几个星期了。 - undefined
1个回答

1
很可能这是一个尝试签署依赖关系的行动。你应该尝试将这些行添加到Podfile中。
installer.pods_project.build_configurations.each do |config|
    config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
    config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
  end

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接