[英]Getting error “Need to acknowledge to Apple's Apple ID and Privacy statement.”
Hi we're getting this error when using fastlane sigh/get_provisioning_profile.您好,我们在使用 fastlane sigh/get_provisioning_profile 时遇到此错误。 I don't think it is a fastlane issue as it happened before case1 case2 and got fixed by accepting the agreement or other unknown reason..我不认为这是一个快车道问题,因为它发生在case1 case2之前,并且通过接受协议或其他未知原因得到了解决。
Need to acknowledge to Apple's Apple ID and Privacy statement.需要承认 Apple 的 Apple ID 和隐私声明。 Please manually log into https://appleid.apple.com (or https://appstoreconnect.apple.com ) to acknowledge the statement. Please manually log into https://appleid.apple.com (or https://appstoreconnect.apple.com ) to acknowledge the statement.
We went to我们去了
but there's nothing to approve there.但那里没有什么可以批准的。
Any ideas?有任何想法吗?
bundle install
, bundle update fastlane
, or bundle update
使用fastlane 2.173.0更新 Gemfile 并运行bundle install
、 bundle update fastlane
或bundle update
SPACESHIP_SKIP_2FA_UPGRADE=1
in your CI在 CI 中使用SPACESHIP_SKIP_2FA_UPGRADE=1
APP_STORE_CONNECT_API_KEY
from appstore connect using an Account Holder role .使用Account Holder 角色从appstore connect生成APP_STORE_CONNECT_API_KEY
。It looks like看起来像
-----BEGIN PRIVATE KEY-----\nabcdef12345abcdef12345\n-----END PRIVATE KEY-----
lane :get_app_store_connect_api_key do
ensure_env_vars(
env_vars: [
'APP_STORE_CONNECT_API_KEY'
]
)
app_store_connect_api_key(
key_id: "12345ABCDEF",
issuer_id: "1234abcd-12ab-12ab-12ab-123456abcdef",
key_content: "#{ENV["APP_STORE_CONNECT_API_KEY"]}".gsub('\n', '\\n'),
in_house: false,
)
end
get_provisioning_profile(api_key: get_app_store_connect_api_key)
sigh(api_key: get_app_store_connect_api_key)
pilot(api_key: get_app_store_connect_api_key)
fastlane spaceauth -u user@email.com
Use the output as FASTLANE_SESSION
environment variable on your CI.使用 output 作为 CI 上的FASTLANE_SESSION
环境变量。
You still need to include FASTLANE_PASSWORD
您仍然需要包含FASTLANE_PASSWORD
Note that this only lasts for 8 hours请注意,这只持续8 小时
Create FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD from https://appleid.apple.com/account/manage从https://appleid.apple.com/account/manage 创建 FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD
Set it as environment variable in your ci在您的 ci 中将其设置为环境变量
fastlane spaceauth -u user@email.com
Use the output as FASTLANE_SESSION
environment variable on your CI.使用 output 作为 CI 上的FASTLANE_SESSION
环境变量。
You still need to include FASTLANE_USER
and FASTLANE_PASSWORD
您仍然需要包括FASTLANE_USER
和FASTLANE_PASSWORD
Note that this only lasts for 8 hours请注意,这只持续8 小时
I had the same exact issue using Bitrise (another CI/CD tool).我在使用Bitrise (另一个 CI/CD 工具)时遇到了同样的问题。 The error message was misleading because it wasn't related to accepting some new policies, but to the new authentication system used by the App Store Connect API .该错误消息具有误导性,因为它与接受某些新策略无关,而是与App Store Connect API使用的新身份验证系统有关。
To fix the issue I logged in Bitrise and I had to switch to the new authentication method as shown in the image below.为了解决这个问题,我登录了 Bitrise,我不得不切换到新的身份验证方法,如下图所示。
The old auth method was based on the credentials of a single Apple Developer user, the new method instead is based on the generation of an API Key.旧的身份验证方法基于单个 Apple Developer 用户的凭据,而新方法则基于 API 密钥的生成。 As you see from the screenshot below, I had to create an API key under User and Access -> Keys and then upload it to Bitrise.正如您从下面的屏幕截图中看到的那样,我必须在User and Access -> Keys下创建一个 API 密钥,然后将其上传到 Bitrise。
I hope my case can help someone else to fix the issue.我希望我的案例可以帮助其他人解决这个问题。 I am pretty sure you have to follow more or less the same procedure even if you're using a different tool.我很确定即使您使用不同的工具,您也必须遵循或多或少相同的程序。
I was experiencing it with an Apple account to authenticate and authorize the fastlane actions.我正在使用 Apple 帐户来验证和授权 fastlane 操作。
Changing my CI to use Apple API key seems to solve the issue.将我的 CI 更改为使用Apple API 密钥似乎可以解决问题。
Fasltane should use app_store_connect_api_key
Fasltane 应该使用app_store_connect_api_key
Here the docs: http://docs.fastlane.tools/actions/app_store_connect_api_key/#app_store_connect_api_key这里的文档: http://docs.fastlane.tools/actions/app_store_connect_api_key/#app_store_connect_api_key
Have you checked your 2FA settings?您检查过您的 2FA 设置吗?
Apple announced that: "Starting February 2021, additional authentication will be required for all users to sign in to App Store Connect."苹果宣布:“从 2021 年 2 月开始,所有用户都需要额外的身份验证才能登录 App Store Connect。”
For Azure DevOps users a temporary SPACESHIP_SKIP_2FA_UPGRADE=1
works while we wait for AppStoreConnect Api key support to be merged:对于 Azure DevOps 用户,在我们等待 AppStoreConnect Api 密钥支持合并时,临时SPACESHIP_SKIP_2FA_UPGRADE=1
有效:
https://github.com/microsoft/app-store-vsts-extension/pull/189 https://github.com/microsoft/app-store-vsts-extension/pull/189
EDIT编辑
Pull request has been merged and API authentication now works and is the preferred way to authenticate.拉取请求已合并,并且 API 身份验证现在可以工作,并且是首选的身份验证方式。
For those, who using Pilot there is a simple solution:对于那些使用Pilot的人来说,有一个简单的解决方案:
Just add this to Pilot:只需将其添加到 Pilot:
skip_waiting_for_build_processing: true,
apple_id: "123456789"
You can find apple_id on AppStoreConnect in General > App information您可以在 AppStoreConnect 的 General > App information 中找到 apple_id
Reference: https://dev.to/dumazy/upload-to-testflight-with-fastlane-and-2fa-11k8参考: https://dev.to/dumazy/upload-to-testflight-with-fastlane-and-2fa-11k8
In my case the following solution worked for uploading the ipa files在我的情况下,以下解决方案适用于上传 ipa 文件
lane :upload_ipa do |options|
api_key = app_store_connect_api_key(
key_id: "xxxxx",
issuer_id: "xxxxxx",
key_filepath: "./fastlane/AuthKey_xxxxx.p8", #Mention the relative path
duration: 1200, # optional
in_house: false, # optional but may be required if using match/sigh
)
# The ipa and team_id are sent as options parameters to the method
pilot(api_key: api_key,
ipa: options[:ipa],
team_id: options[:team_id],
skip_waiting_for_build_processing: true,
wait_processing_interval: 120,
app_platform: options[:app_platform])
end
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.