Apple Developer Program 角色和权限,适用于 EAS Build
编辑页面
了解创建 EAS Build 所需的 Apple Developer 账户成员资格要求。
For the complete documentation index, see llms.txt. Use this Use this file to discover all available pages.
使用 EAS Build 创建 iOS 设备构建时,需要一个具有创建 app signing credentials 权限的 Apple Developer 账号,例如证书、标识符和 provisioning profile。这些凭据可以在提交构建时通过从 EAS CLI 登录你的 Apple 账号来生成,或者由授权用户上传到你的 Expo 账号,这样没有 Apple Developer 账号访问权限的用户也可以使用已上传的凭据创建构建。
对于个人 Apple Developer 账号,只有 Account Holder 角色可以生成 app signing credentials。对于组织 Apple Developer 账号,Account Holder 和 Admin 角色始终可以生成 app signing credentials,而 App Manager 角色在具有此角色的用户的 App Store Connect 用户权限中启用了 Access to Certificates, Identifiers, and Profiles 时也可以生成凭据。
本指南提供了授权用户可以遵循的步骤,以确保 app signing credentials 已生成并可供使用 EAS 的团队成员使用。它还提供了团队开发者使用预生成凭据创建 EAS Build 的步骤。
有关不同角色及其权限的详细信息,请参阅 Apple 关于 Program Roles 的文档,其中说明了不同类型 Developer 账号下各角色所需的权限。
Apple Developer 账号授权用户的步骤
Apple Developer 账号的授权用户需要生成以下凭据:
- Distribution signing certificate:用于签名安装在 iOS 设备上的开发和发布构建。
- Ad hoc provisioning profile:用于签名安装在 Apple App Store 之外设备上的构建。
- Distribution provisioning profile:用于签名提交到 Apple App Store 的构建。
- Push key:使用推送通知服务时需要。
有关 Distribution certificate、Provision profiles 和 Push keys 的详细信息,请参阅 required iOS app credentials。
使用 EAS CLI,以上所有凭据都可以自动创建并与 Apple Developer 账号同步。一旦授权用户登录到他们的 Expo account,就可以通过使用 EAS CLI 运行 eas credentials 来创建或更新 provisioning profile。
- eas login- eas credentialsCLI 会提示选择用于 EAS Build 的 build profile。如果 Apple Developer 账号的授权用户正在创建生产构建,请按照以下步骤 创建 distribution provisioning profile。要创建开发者构建,请按照以下步骤 创建 ad hoc provisioning profile。
这可确保与 Expo 账号关联的 provisioning profile 具有所需权限。
对于已有凭据的项目,请参阅 Using existing credentials,了解如何将这些凭据同步到 EAS 或手动管理它们。
团队开发者的步骤
作为团队中的开发者,在终端窗口中运行 eas build -p ios 时,EAS CLI 会要求你登录 Apple Developer 账号。
? 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 Developer 账号(并避免登录你个人的 Apple Developer 账号,如有)。CLI 会显示关于跳过 provisioning profile 验证和其他 app signing credentials 验证的消息,并将继续使用现有凭据创建 EAS Build
EAS CLI 需要使用与 Expo 账号关联的 provisioning profile 来创建 iOS 构建。当你跳过登录时,EAS Build 将使用你组织的 Expo 账号中由 Apple Developer 账号授权用户更新的最新 provisioning profile 和其他凭据。
其他信息
上传预生成的 Apple 凭据
某些开发团队可能会选择在 EAS 之外生成 distribution certificates 和 provisioning profiles。这些凭据可以由任何具有 Developer 或更高权限的 EAS 用户通过使用 eas credentials,或在 EAS dashboard 中通过 Select your project > Project settings > Configuration > Credentials 来添加。
上传凭据时,你需要 .p12 和 .mobileprovision 文件,以及生成 distribution certificate 时设置的任何密码。
Provisioning profile 过期与更新
如果添加或移除了某些 iOS capabilities(例如 entitlements),或者 profile 到了年度过期时间,则需要更新关联的 provisioning profile。此步骤由 Apple Developer 账号的授权用户处理。
联邦 Apple Developer 账号
EAS Build
EAS CLI 只能接受 Apple 账号的邮箱和密码来登录你的 Apple Developer 账号。你无法登录 Federated Apple Developer account 并对 distribution certificate 或 provisioning profile 进行更新。如果你的构建凭据不需要任何更改,你可以跳过登录。然后你就可以继续构建,EAS CLI 将继续使用你当前上传的凭据。
不过,在运行 eas build 命令时,你可以提供一个具有 Admin 访问权限的 Apple Store Connect (ASC) API token,以检查和更新 Apple 凭据。请按照 为你的 Apple 团队提供 ASC API Token 中的步骤,通过将所需的 token 值传递给 eas build 命令来创建构建。
EAS Submit
EAS Submit 使用 ASC API token 提交到 TestFlight。如果你有联邦 Apple Developer 账号,可以按照标准的 EAS Submit 设置来配置。它允许你使用 eas build --auto-submit 自动提交你的构建。