gpt4 book ai didi

ios - Azure Devops macOS Pipeline 在托​​管时失败,缺少配置文件

转载 作者:行者123 更新时间:2023-12-03 23:45:16 26 4
gpt4 key购买 nike

我正在运行 Azure DevOps Pipeline,它会生成 .ipa 文件。它在我的本地代理上运行没有任何问题,但是当我在托管 macOS 10.15 计算机上运行它时,我会收到一个错误,提示配置文件丢失

❌错误:未找到“app.zookeeper.platypus”的配置文件:Xcode 找不到任何与“app.zookeeper.platypus”匹配的 iOS 应用程序开发配置文件。自动签名已禁用,无法生成配置文件。要启用自动签名,请将 -allowProvisioningUpdates 传递给 xcodebuild。 (在项目“Runner”的目标“Runner”中)

- task: InstallAppleProvisioningProfile@1
displayName: 'Install an Apple provisioning profile'
inputs:
provProfileSecureFile: App.mobileprovision

- task: InstallAppleCertificate@2
displayName: 'Install an Apple certificate'
inputs:
certSecureFile: 'Certs.p12'
certPwd: xxx

- task: Xcode@5
displayName: 'Xcode archive'
inputs:
actions: archive
xcWorkspacePath: 'src/Apps/App/ios/Runner.xcworkspace'
scheme: Runner
packageApp: true
archivePath: 'src/Apps/App/ios/Runner.xcarchive'
exportPath: '$(build.artifactstagingdirectory)'
signingOption: auto

这是安装配置文件任务的输出

Starting: Install an Apple provisioning profile
==============================================================================
Task : Install Apple provisioning profile
Description : Install an Apple provisioning profile required to build on a macOS agent machine
Version : 1.171.0
Author : Microsoft Corporation
Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/utility/install-apple-provisioning-profile
==============================================================================
/usr/bin/security cms -D -i /Users/runner/work/_temp/platypus.mobileprovision
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AppIDName</key>
<string>Platypus identifier</string>
<key>ApplicationIdentifierPrefix</key>
<array>
<string>UM3UVMPGY5</string>
</array>
<key>CreationDate</key>
<date>2020-07-31T14:08:38Z</date>
<key>Platform</key>
<array>
<string>iOS</string>
</array>
<key>IsXcodeManaged</key>
<false/>
<key>DeveloperCertificates</key>
<array>
<data>MIIF...</data> <- shortened for better reading
<data>MIIF...</data> <- shortened for better reading
<data>MIIF...</data> <- shortened for better reading
</array>


<key>Entitlements</key>
<dict>

<key>application-identifier</key>
<string>UM3UVMPGY5.app.zookeeper.platypus</string>
<key>keychain-access-groups</key>
<array>
<string>UM3UVMPGY5.*</string>
<string>com.apple.token</string>
</array>

<key>get-task-allow</key>
<true/>

<key>com.apple.developer.team-identifier</key>
<string>UM3UVMPGY5</string>
<key>com.apple.developer.authentication-services.autofill-credential-provider</key>
<true/>

</dict>
<key>ExpirationDate</key>
<date>2021-07-31T14:08:38Z</date>
<key>Name</key>
<string>platypus</string>
<key>ProvisionedDevices</key>
<array>
<string>00008030-0011193A11D8802E</string>
</array>
<key>TeamIdentifier</key>
<array>
<string>UM3UVMPGY5</string>
</array>
<key>TeamName</key>
<string>Daniel Martin</string>
<key>TimeToLive</key>
<integer>365</integer>
<key>UUID</key>
<string>19e4f1a2-a4fd-42f6-ac17-b8bc864fa1d7</string>
<key>Version</key>
<integer>1</integer>
</dict>
/usr/libexec/PlistBuddy -c Print UUID _xcodetasktmp.plist
19e4f1a2-a4fd-42f6-ac17-b8bc864fa1d7
/usr/libexec/PlistBuddy -c Print Name _xcodetasktmp.plist
platypus
/bin/rm -f _xcodetasktmp.plist
/bin/cp -f /Users/runner/work/_temp/platypus.mobileprovision /Users/runner/Library/MobileDevice/Provisioning Profiles/19e4f1a2-a4fd-42f6-ac17-b8bc864fa1d7.mobileprovision
Finishing: Install an Apple provisioning profile

以及失败的 XCOde 存档任务:

Starting: Xcode archive
==============================================================================
Task : Xcode
Description : Build, test, or archive an Xcode workspace on macOS. Optionally package an app.
Version : 5.170.2
Author : Microsoft Corporation
Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/build/xcode
==============================================================================
/usr/bin/xcodebuild -version
Xcode 11.3.1
Build version 11C505
/usr/bin/xcodebuild -configuration $(Configuration) -workspace /Users/runner/work/1/s/src/Apps/platypus_app/ios/Runner.xcworkspace -scheme Runner archive CODE_SIGN_STYLE=Automatic | /usr/local/lib/ruby/gems/2.6.0/bin/xcpretty -r junit --no-color

❌ error: No profiles for 'app.zookeeper.platypus' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'app.zookeeper.platypus'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'Runner' from project 'Runner')


** ARCHIVE FAILED **

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

我是一个拥有苹果证书的初学者,所以我想我在这里遗漏了一些东西感谢您的帮助!

编辑

设置后

signingIdentity: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)'
provisioningProfileUuid: '$(APPLE_PROV_PROFILE_UUID)'

我会收到一堆新错误。

❌  error: image_picker does not support provisioning profiles. image_picker does not support provisioning profiles, but provisioning profile platypus has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'image_picker' from project 'Pods')

❌ error: flutter_secure_storage does not support provisioning profiles. flutter_secure_storage does not support provisioning profiles, but provisioning profile platypus has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'flutter_secure_storage' from project 'Pods')

❌ error: MTBBarcodeScanner does not support provisioning profiles. MTBBarcodeScanner does not support provisioning profiles, but provisioning profile platypus has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'MTBBarcodeScanner' from project 'Pods')

❌ error: sqflite does not support provisioning profiles. sqflite does not support provisioning profiles, but provisioning profile platypus has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'sqflite' from project 'Pods')

❌ error: Pods-Runner does not support provisioning profiles. Pods-Runner does not support provisioning profiles, but provisioning profile platypus has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'Pods-Runner' from project 'Pods')

❌ error: Provisioning profile "platypus" doesn't include signing certificate "iPhone Distribution: Daniel Martin (UM3UVMPGY5)". (in target 'Runner' from project 'Runner')

❌ error: path_provider does not support provisioning profiles. path_provider does not support provisioning profiles, but provisioning profile platypus has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'path_provider' from project 'Pods')

这些是我包含在我的 flutter 应用程序中的所有包。

最佳答案

确保您已将配置文件和 .p12 文件上传到管道库。之后,您可以将其包含在 Podfile 的末尾:

post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
end
end

有关更多信息,请参阅此 article

关于ios - Azure Devops macOS Pipeline 在托​​管时失败,缺少配置文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63197234/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com