简体   繁体   English

收到错误“需要承认 Apple 的 Apple ID 和隐私声明。”

[英]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?有任何想法吗?

Summary:概括:

Case 1:情况1:

* You don't want 2FA enabled * 你不想启用 2FA

  1. Update Gemfile with fastlane 2.173.0 and run bundle install , bundle update fastlane , or bundle update使用fastlane 2.173.0更新 Gemfile 并运行bundle installbundle update fastlanebundle update
  2. Use SPACESHIP_SKIP_2FA_UPGRADE=1 in your CI在 CI 中使用SPACESHIP_SKIP_2FA_UPGRADE=1

Case 2:案例二:

* You have 2FA enabled * 您已启用 2FA

* You only need non-enterprise account * 您只需要非企业账户

  1. Generate 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-----
  1. Add it to your CI as APP_STORE_CONNECT_API_KEY environment variable将其作为 APP_STORE_CONNECT_API_KEY 环境变量添加到您的 CI
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
  1. Pass it to your lanes把它传到你的车道
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)

Case 3:案例3:

* You have 2FA enabled * 您已启用 2FA

* You need enterprise account and fetch profiles *您需要企业帐户并获取配置文件

  1. Run
fastlane spaceauth -u user@email.com
  1. Use the output as FASTLANE_SESSION environment variable on your CI.使用 output 作为 CI 上的FASTLANE_SESSION环境变量。

  2. You still need to include FASTLANE_PASSWORD您仍然需要包含FASTLANE_PASSWORD

Note that this only lasts for 8 hours请注意,这只持续8 小时

Case 4:案例4:

* You have 2FA enabled * 您已启用 2FA

* You need enterprise or non-enterprise account * 您需要企业账号或非企业账号

* You need to upload to appstore * 您需要上传到应用商店

  1. Create FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD from https://appleid.apple.com/account/managehttps://appleid.apple.com/account/manage 创建 FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD

  2. Set it as environment variable in your ci在您的 ci 中将其设置为环境变量

Case 5:案例5:

* You have 2FA enabled * 您已启用 2FA

* You need to download dsyms from appstore connect * 您需要从 appstore connect 下载 dsyms

  1. Run
fastlane spaceauth -u user@email.com
  1. Use the output as FASTLANE_SESSION environment variable on your CI.使用 output 作为 CI 上的FASTLANE_SESSION环境变量。

  2. You still need to include FASTLANE_USER and FASTLANE_PASSWORD您仍然需要包括FASTLANE_USERFASTLANE_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

飞船跳过2FA升级


EDIT编辑


Pull request has been merged and API authentication now works and is the preferred way to authenticate.拉取请求已合并,并且 API 身份验证现在可以工作,并且是首选的身份验证方式。

AppStoreConnect 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.

相关问题 Apple 应用隐私数据收集:如果我们要求用户的 email 在应用中创建帐户,这是否算作“收集”email 地址? - Apple App Privacy Data Collection: If we require the user's email to create an account in an app, does that count as "collecting" the email address? 如果我更改了与 Apple Developer 帐户关联的 Apple ID,会发生什么? - What will happen if I change apple id associated with Apple Developer account? Apple 开发者:如何生成 App Id - Apple developer: How to generate App Id App Store Connect 中的 Apple App Privacy 应该如何填写? - How should I fill out the Apple App Privacy in App Store Connect? 在 Apple Store 上提交应用程序时出错 - Error while submitting app on Apple Store App Store Connect 操作错误:Could not connect to Apple's web service - App Store Connect Operation Error: Could not connect to Apple's web service 接受与 Apple ID 不同的 email 地址的 TestFlight 邀请? - Accept TestFlight invite with email address different to Apple ID? Xcode 使用哪些 URL 与 Apple 的服务器通信 - Which URL's are used by Xcode to communicate with Apple's servers 开发者和帐户持有人都需要付费的 Apple Developer 帐户吗? - Do both the developer and account holder need paid Apple Developer accounts? 当电话号码是 Apple Id 时如何添加到 iTunes Connect 用户 - How to add to iTunes Connect users, when phone number is Apple Id
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM