错误 ITMS-90174:“缺少配置文件 - 应用程序必须在名为 embedded.mobileprovision 的文件中包含配置文件。”

ERROR ITMS-90174: “Missing Provisioning Profile - Apps must contain a provisioning profile in a file named embedded.mobileprovision.”

过去几天我一直在尝试构建一个 Azure Pipeline,它构建一个 iOS 项目并将其部署到 Test-flight。我已经能够让它成功构建并生成 .ipa 但我在 AppStoreRelease@1 任务中保留了 运行 这个错误:

ERROR ITMS-90174: “Missing Provisioning Profile - Apps must contain a provisioning profile in a file named embedded.mobileprovision.”

这几天我检查了多个类似的问题,但 none 的答案似乎解决了问题。到目前为止,我已经尝试了 --buildFlag="-UseModernBuildSystem=0"。下面是我的.yml。在这一点上我几乎放弃了所以任何帮助都会有很大的帮助。

steps:
    - task: InstallAppleCertificate@2
        inputs:
            certSecureFile: '$(certSecureFile)'
            certPwd: '$(password)'

    - task: InstallAppleProvisioningProfile@1
        inputs:
            provisioningProfileLocation: 'sourceRepository'
            provProfileSourceRepository: 'sourcefile.mobileprovision'


    - task: Xcode@5
        inputs:
            actions: 'build'
            scheme: 'Scheme'
            sdk: 'iphoneos'
            packageApp: true
            exportOptions: 'plist'
            exportOptionsPlist: 'ExportOptions.plist'
            signingOption: 'manual'
            signingIdentity: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)'
            provisioningProfileUuid: '$(APPLE_PROV_PROFILE_UUID)'
            exportPath: "$(system.DefaultWorkingDirectory)"
            args: 'CODE_SIGNING_ALLOWED=No -UseModernBuildSystem=0'
            configuration: 'Release'
            teamId: 'TeamId'
            exportTeamId: 'TeamId'
            xcWorkspacePath: '**/*.xcworkspace'
            xcodeVersion: 'default' # Options: 8, 9, 10, default, specifyPath

    - task: CopyFiles@2
        inputs:
            contents: '**/*.ipa'
            targetFolder: '$(build.artifactStagingDirectory)'
    - task: PublishBuildArtifacts@1
    - task: AppStoreRelease@1
        inputs:
            authType: 'UserAndPass'
            username: '$(user)'
            password: '$(pass)'
            appIdentifier: 'App Identifier'
            appType: 'iOS'
            ipaPath: '$(build.artifactStagingDirectory)/**/*.ipa'
            releaseTrack: 'TestFlight'
            teamId: 'Team ID'
            teamName: 'Team Name'
            fastlaneArguments: 'action increment_build_number'

Xcode 应用必须在设备上签名并提供给 运行 或发布到 App Store。您的 ios 应用似乎未成功签名。

我看到您在 XCode 任务的属性 args 中定义了 CODE_SIGNING_ALLOWED=No。此争论 CODE_SIGNING_ALLOWED=No 将跳过代码签名。看到这个 thread。您还可以查看 Xcode 任务的任务日志以查看您的应用是否已成功签名。

您可以尝试删除 Xcode 任务的争论 CODE_SIGNING_ALLOWED=No