xcodebuild \
-exportArchive -verbose \
-sdk iphoneos \
-archivePath XYZProject.xcarchive \
-exportOptionsPlist $RUNNER_TEMP/ExportOptions.plist \
-exportPath "" \
-authenticationKeyIssuerID ${{ secrets.APPSTORE_ISSUER_ID }} \
-authenticationKeyID ${{ secrets.APPSTORE_API_KEY_ID }} \
-authenticationKeyPath $RUNNER_TEMP/AuthKey_${{ secrets.APPSTORE_API_KEY_ID }}.p8
字符串
将构建上传到appstore connect失败,并显示错误:
error: exportArchive: Failed to log in.
Error Domain=IDEDistributionErrorDomain Code=10 "Failed to log in." UserInfo={IDEDistributionErrorsAccountIssues=(
), NSLocalizedDescription=Failed to log in., NSLocalizedRecoverySuggestion=App Store Connect access for “*******” is required. Ensure that your Apple ID account usernames and passwords are correct in the Accounts preference pane.}
型
如果我使用appleId
登录Xcode,这就可以正常工作,但这就是为什么我使用authenticationKeyID, authenticationKeyIssuerID, authenticationKeyPath
进行身份验证。
ExportOptions.plist
<?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>destination</key>
<string>upload</string>
<key>manageAppVersionAndBuildNumber</key>
<true/>
<key>method</key>
<string>app-store</string>
<key>provisioningProfiles</key>
<dict>
<key>com.my.bundle.id</key>
<string>AppName - PROD</string>
</dict>
<key>signingCertificate</key>
<string>Apple Distribution</string>
<key>signingStyle</key>
<string>manual</string>
<key>stripSwiftSymbols</key>
<true/>
<key>teamID</key>
<string>teamID</string>
<key>uploadSymbols</key>
<true/>
</dict>
</plist>
型
你知道这是怎么回事吗?
请注意,密钥具有对应用商店连接的开发人员角色访问权限。
编辑:使用管理员密钥也不能解决问题
1条答案
按热度按时间zqry0prt1#
即使使用
developer
角色访问,您也可能需要在App Store Connect中为您的用户启用Access to Certificates, Identifiers & Profiles
(参见屏幕截图)。的数据