EAS Build 的 Apple 开发者计划角色和权限

了解创建 EAS 构建的 Apple 开发者账户成员资格要求。


使用 EAS Build 创建 iOS 设备构建时,需要一个拥有创建应用签名凭证权限的 Apple 开发者账户,例如证书、标识符和配置文件。这些凭证可以在提交构建时通过从 EAS CLI 登录你的 Apple 账户来生成,也可以由授权用户上传到你的 Expo 账户,这样没有 Apple 开发者账户访问权限的用户也可以使用上传的凭证创建构建。

🌐 An Apple Developer account with permissions to create app signing credentials, such as certificates, identifiers, and provisioning profiles, is required when using EAS Build to create iOS device builds. These credentials can be generated when submitting the build by logging into your Apple Account from the EAS CLI, or they can be uploaded to your Expo account by an authorized user, so users without Apple Developer account access can create builds using the uploaded credentials.

在个人 Apple 开发者账号中,只有账户持有人角色可以生成应用签名凭证。在组织 Apple 开发者账号中,账户持有人和管理员角色始终可以生成应用签名凭证,而应用管理员角色在其 App Store Connect 用户权限中启用了“访问证书、标识符和描述文件”时也可以生成凭证。

🌐 On individual Apple Developer accounts, only the Account Holder role can generate app signing credentials. On an organization Apple Developer account, the Account Holder and Admin roles can always generate app signing credentials, and the App Manager role can generate credentials when a user with this role has Access to Certificates, Identifiers, and Profiles enabled in their App Store Connect user permissions.

Access to Certificates, Identifiers, and Profiles settings in App Store Connect.

本指南提供了授权用户可以遵循的步骤,以确保应用签名凭据已生成并可供使用 EAS 的团队成员使用。它还提供了团队开发者使用预生成的凭据创建 EAS 构建的步骤。

🌐 This guide provides steps that an authorized user can follow to ensure app signing credentials are generated and available to their team members who use EAS. It also provides steps for the team developer to create an EAS Build by using pre-generated credentials.

有关不同角色及其权限的详细信息,请参阅 Apple 的程序角色文档,其中说明了每种开发者账户类型对应的权限以及每个角色所需的权限。

Apple Developer 账户授权用户的步骤

🌐 Steps for Apple Developer account's authorized user

Apple 开发者账户的授权用户需要生成以下凭据:

🌐 The authorized user of the Apple Developer account needs to generate the following credentials:

  • 分发签名证书:用于签署安装在 iOS 设备上的开发和发布版本。
  • 临时配置描述文件:用于对安装在苹果App Store之外的设备上的构建进行签名。
  • 分发配置描述文件:用于签署提交到 Apple App Store 的构建版本。
  • 推送密钥:使用推送通知服务时必需。

有关分发证书、配置描述文件和推送密钥的详细信息,请参见所需的 iOS 应用凭证

🌐 For details on Distribution certificate, Provision profiles, and Push keys, see required iOS app credentials.

使用 EAS CLI,以上所有凭证都可以自动创建并与 Apple 开发者账号同步。一旦授权用户登录他们的 Expo 账号,他们可以通过使用 EAS CLI 运行 eas credentials 来创建或更新配置描述文件。

🌐 With EAS CLI, all of the above credentials can be created and synced automatically with the Apple Developer account. Once the authorized user logs in to their Expo account, they can create or update the provisioning profile by running eas credentials using the EAS CLI.

Terminal
eas login

eas credentials

CLI 将提示选择用于 EAS 构建的 构建配置文件。如果 Apple 开发者账号的授权用户正在创建生产构建,请按照以下步骤 创建分发配置文件。要创建开发者构建,请按照以下步骤 创建临时配置文件

🌐 The CLI will prompt for selecting a build profile to use for the EAS Build. If the Apple Developer account's authorized user is creating a production build, follow these steps to create a distribution provisioning profile. To create a developer build, follow these steps to create an ad hoc provisioning profile.

这可确保与 Expo 账户关联的配置文件具有必要的权限。

🌐 This ensures that the provisioning profile associated with the Expo account has necessary permissions.

对于已有凭证的项目,请参阅 使用现有凭证 了解如何将这些凭证同步到 EAS 或手动管理它们的详细信息。

团队开发者的步骤

🌐 Steps for the team developer

作为团队的开发者,在终端窗口运行 eas build -p ios 时,EAS CLI 会要求你登录 Apple 开发者账户。

🌐 As a developer on the team, when running eas build -p ios in the terminal window, the EAS CLI asks you to login to an Apple Developer account.

Terminal
? Do you want to log in to your Apple account? > (Y/n)
No problem! 👌 If any of the next steps will require Apple account access we will ask you again about it.

如果你无法访问,请按 n 跳过登录 Apple 开发者账户(并避免登录你的个人 Apple 开发者账户(如果有))。CLI 会显示有关跳过配置描述文件验证和其他应用签名凭证验证的消息,并将继续使用现有凭证创建 EAS 构建。

EAS CLI 需要使用与 Expo 账户关联的配置描述文件来创建 iOS 构建。当你跳过登录时,EAS Build 将使用由你所在组织的 Expo 账户中的 Apple 开发者账户授权用户更新的最后一个配置描述文件及其他凭证。

🌐 The EAS CLI needs to use the provisioning profile associated with the Expo account to create a build for iOS. When you skip login, the EAS Build will use the last provisioning profile and other credentials that were updated by the Apple Developer account's authorized user in your organization's Expo account.

附加信息

🌐 Additional information

上传预生成的 Apple 凭据

🌐 Uploading pre-generated Apple credentials

一些开发团队可能选择在 EAS 外部生成分发证书和配置描述文件。任何具有开发者或更高级别权限的 EAS 用户都可以使用 eas credentials 添加这些凭据,或在 EAS 仪表板中通过 选择你的项目 > 项目设置 > 配置 > 凭据 添加。

🌐 Some development teams may choose to generate distribution certificates and provisioning profiles outside of EAS. These credentials can be added by any EAS user with Developer or higher permissions using eas credentials or under Select your project > Project settings > Configuration > Credentials using the EAS dashboard.

上传凭证时,你需要 .p12.mobileprovision 文件,以及生成分发证书时设置的任何密码。

🌐 When uploading the credentials, you will need the .p12 and .mobileprovision files, and any passwords set when generating the distribution certificate.

配置文件到期和更新

🌐 Provisioning profile expiry and updates

如果添加或移除某些iOS功能(例如权限),或者在配置文件的年度到期时,需要更新关联的配置文件。这一步由Apple开发者账户的授权用户处理。

🌐 The associated provisioning profile needs to be updated if certain iOS capabilities (such as, entitlements) are added or removed, or at the annual expiry of the profile. This step is handled by the Apple Developer account's authorized user.

联合 Apple 开发者账户

🌐 Federated Apple Developer accounts

EAS 构建

🌐 EAS Build

EAS CLI 只能接受 Apple 账户的电子邮件和密码来登录你的 Apple 开发者账户。你无法登录 联邦 Apple 开发者账户 并更新分发证书或配置文件。如果你的构建凭证不需要任何更改,你可以跳过登录。然后,你可以继续构建,EAS CLI 将继续使用你当前上传的凭证。

🌐 EAS CLI can only accept an Apple account's email and password to login into your Apple Developer account. You cannot login into Federated Apple Developer account and make updates to the distribution certificate or provisioning profile. If your build credentials do not require any changes, you can skip logging in. Then, you can proceed with the build and EAS CLI will continue using your current uploaded credentials.

但是,你可以提供具有管理员访问权限的 Apple Store Connect (ASC) API 令牌,以便在运行 eas build 命令时检查和更新 Apple 凭证。请按照 为你的 Apple 团队提供 ASC API 令牌 中的步骤,通过将所需的令牌值传递给 eas build 命令来创建构建。

🌐 However, you can provide an Apple Store Connect (ASC) API token with Admin access to check and update Apple credentials when running eas build command. Follow the steps in Provide an ASC API Token for your Apple Team to create a build by passing the required token value to the eas build command.

EAS 提交

🌐 EAS Submit

EAS Submit 使用 ASC API 令牌提交到 TestFlight。如果你有一个联合 Apple 开发者账户,可以按照标准的 EAS Submit 设置进行操作。它允许你使用 eas build --auto-submit 自动提交你的构建。

🌐 EAS Submit uses the ASC API token for submitting to TestFlight. If you have a Federated Apple Developer account, you can follow the standard EAS Submit setup. It lets you automatically submit your builds using eas build --auto-submit.