This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
为 iOS 设备创建并运行云构建
编辑页面
了解如何使用 EAS Build 为 iOS 设备配置开发构建。
In this chapter, we will create a development build that can run on iOS devices using EAS Build.
Development builds for iOS devices are generated in the .ipa format, which is the standard format for installing iOS apps.

Learn how to build and run a development build on a physical iOS device using EAS Build, including setting up code signing.
2 requirements
2 requirements
1.
Access to the required credentials used to sign our app is needed, because each build requires signing to verify that the app comes from a trusted source. EAS Build can help manage these credentials.
2.
Developer Mode must be enabled to install development builds on a device. If this is your first time using it, or if it is currently disabled, see Enable Developer Mode.
配置文件
要在 iOS 设备上开始开发,我们需要:
- 通过创建新的 配置文件 来注册设备。
- 将此配置文件下载并安装到设备上。
1
2
iOS 设备的开发构建
1
创建
要在 iOS 设备上创建开发构建,请确保在 build.development 配置下:
- 在 eas.json 中将
developmentClient设置为true,默认配置已经完成了这一点。 - 然后运行
eas build命令,指定ios作为平台,development作为构建配置:
- eas build --platform ios --profile development提示:下次运行eas build命令时,你也可以使用-p来指定平台。它是--platform的简写。
当我们第一次创建构建时,此命令会提示我们回答以下问题:
- 你的 iOS bundle identifier 应该是什么? 按 Return 选择此提示提供的默认值。如果尚未定义,这将把
ios.bundleIdentifier添加到 app.json 中。 - 你想登录到你的 Apple 账户吗?。由于我们是第一次创建开发构建,它会要求我们 生成一个新的 Apple Distribution Certificate。两次都按 Y。
- 选择一个用于 ad hoc 构建的设备。这是关键步骤,这也是我们之前必须先注册配置文件的原因。我们可以在这里选择一个或所有已注册设备,然后按回车,稍后将该构建安装到这些设备上。
在新的或最近续期的 Apple Developer Program 会员资格下,新注册的设备可能不会立即可安装。 通过 Expo 注册设备不会将其注册到 Apple。只有当设备首次被包含在构建中时,才会将其添加到 Apple。对于这种会员资格,Apple 可能需要 最多 24–72 小时 来完成对该设备的处理,之后才能将其添加到配置文件中,因此在你首次包含新注册设备时,构建可能会失败。如果发生这种情况,请等待 Apple 完成处理,然后再次运行构建。
仅在你跳过了 iOS 模拟器章节 时: 系统会提示你 iOS app only uses standard/exempt encryption? 按 Y 选择此提示提供的默认值。由于我们的应用不使用加密,它会在 Info.plist 文件中将ITSAppUsesNonExemptEncryption设置为NO,并在你将应用发布到 TestFlight/Apple App Store 时管理相应的合规检查。当你发布自己的应用且它使用加密时,你可以选择 N,以便下次跳过此提示。
回答完后,构建将进入队列,我们可以通过 EAS CLI 提供的链接在 EAS 仪表盘中跟踪其进度:
构建详情页面包含什么?
构建详情页面会显示构建类型、配置、Expo SDK 版本、应用版本、构建号、最后一次提交哈希,以及发起构建的开发者或账户所有者身份。
在上图中,构建产物 的当前状态显示构建正在进行中。完成后,此部分将提供下载构建的选项。日志 会概述 EAS Build 上 iOS 构建过程中执行的每一步。为了简洁起见,这里我们不会逐步展开每一步。要了解更多,请参阅 iOS 构建过程。
2
安装
构建完成后,构建产物部分会更新,表示构建已完成:
这一部分提供了在 iOS 设备上运行开发构建的可用方法:Expo Orbit 和安装按钮。
Expo Orbit 可以让你在 iOS 设备上无缝安装开发构建。使用此方法:
- 使用 USB 将 iOS 设备连接到开发机器。
- 打开 Orbit 菜单栏应用。
- 在 Orbit 应用中选择 设备。
- 在 EAS 仪表盘中,位于 构建产物 下,点击 使用 Orbit 打开。
构建安装完成后,Orbit 应用会在设备上启动该开发构建。
3
总结
Chapter 4: Create and run a cloud build for iOS device
We successfully used EAS Build to create and run development builds on iOS devices.
In the next chapter, learn how to configure our app config to install multiple app variants on a single device.