This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.

EAS 模拟器入门

通过 CLI、REST API、AI 代理或浏览器在 EAS 基础设施上运行和控制远程 iOS 模拟器和 Android 模拟器。


EAS 模拟器 在 EAS 基础设施上运行远程 iOS 模拟器或 Android 模拟器。你可以安装应用、查看其用户界面,并进行交互。你还可以收集截图和录制视频,或者分享 iOS 浏览器预览,而无需在本地运行设备。

EAS 模拟器是为智能代理开发而打造的。它为编码代理提供了一个真实设备的运行环境,用于验证代理编写的代码。代理可以修复它们观察到的问题,并从运行中的应用中返回证据。

🌐 EAS Simulator is built for agentic development. It gives coding agents a real device runtime for verifying agent-written code. Agents can fix issues they observe and return evidence from the running app.

EAS 模拟器尤其在以下情况下很有用:

🌐 EAS Simulator is especially useful when:

  • 一个后台或云端编码代理需要访问沙箱中不可用的设备
  • 一个 AI 代理需要验证正在运行的应用中的更改,而不仅仅是检查源代码
  • 你想要一个临时的、可以分享的 iOS 浏览器预览
  • 你需要把模拟器计算任务或测试转到远程平台上

当你已经有所需的本地设备运行时,EAS 模拟器并不能替代本地 Xcode 或 Android Studio 的工作流程。只有在你需要远程或可共享访问时才使用它。

🌐 EAS Simulator does not replace local Xcode or Android Studio workflows when you already have the required local device runtime. Use it when you need remote or shareable access.

使用带有编码代理的EAS模拟器

🌐 Use EAS Simulator with a coding agent

对于自主发展,先从官方的 EAS 模拟器技能开始。让你的编程代理使用这个技能,而不是给它下达单独的 EAS CLI 和控制器命令。这个技能涵盖了访问检查、构建准备、会话命名和限制、远程会话、控制器工作流程、证据收集以及清理。

🌐 For agentic development, start with the official EAS Simulator skill. Ask your coding agent to use the skill instead of giving it individual EAS CLI and controller commands. The skill covers the access check, build preparation, session naming and limits, remote session, controller workflow, evidence collection, and cleanup.

eas-simulator

Run and control a user's app on a remote iOS/Android simulator hosted on EAS cloud.

然后代理就可以完成运行时循环了:

🌐 The agent can then complete the runtime loop:

  1. 实现或修复代码。
  2. 检查EAS模拟器的访问权限并准备一个兼容的应用版本。
  3. 启动远程设备,并通过代理设备或Argent操作应用。
  4. 检查结果,如果需要就再改进一下。
  5. 把截图、录音、日志或其他证据交出来,然后结束会话。

典型设置:一个 Cursor 云代理

🌐 Typical setup: a Cursor cloud agent

一个常见的设置是使用Cursor 云代理或者其他在云项目检出中工作的后台编码代理。这个环境可以编辑和构建项目,但不能启动本地 iOS 模拟器。使用 EAS 模拟器技能时,代理会在 EAS 上启动远程设备,并通过 agent-device 或 Argent 控制它。然后,它会将结果返回到任务或拉取请求,而你的电脑不需要托管模拟器。

🌐 A common setup is a Cursor cloud agent or another background coding agent working in a cloud project checkout. The environment can edit and build the project, but it cannot launch a local iOS Simulator. With the EAS Simulator skill, the agent starts a remote device on EAS and controls it through agent-device or Argent. It then returns the result to the task or pull request, while your computer does not need to host the simulator.

工作原理

🌐 How it works

EAS 模拟器的工作流程有四个阶段:

🌐 An EAS Simulator workflow has four stages:

  1. 开始会话 使用 EAS CLI、REST API 或经过身份验证的 创建会话链接。给会话起一个描述性的名字,选择一个远程设备和会话类型,并且可以选择设置自动时长或空闲限制。
  2. 安装你的应用。 在启动命令中传递 EAS 构建、应用存档 URL 或 Expo Go,或者在会话开始后通过控制器安装本地构建。没有应用源的会话会以空白设备启动。
  3. 驱动设备。 使用 agent-device、Argent 或 Appium 进行程序化控制。支持的 iOS 会话还包括网页预览。
  4. 停止会话。 完成时要明确地停止它。无人看管的非交互式会话会继续消耗使用量,直到它停止或达到设置的限制。

EAS CLI 管理会话的生命周期和连接配置。使用 REST API 可以从你自己的 HTTP 客户端管理会话。控制器提供设备操作,比如打开应用、按按钮、输入文字、检查无障碍树以及截取屏幕截图。

🌐 EAS CLI manages the session lifecycle and connection configuration. Use the REST API to manage sessions from your own HTTP client. The controller provides device actions such as opening an app, pressing a button, entering text, inspecting the accessibility tree, and capturing a screenshot.

可用表面

🌐 Available surfaces

能力可用性
远程 iOS 模拟器
远程 Android 模拟器
通过 agent-device 的程序化控制
通过 Argent 的程序化控制
通过 Appium 的程序化控制
iOS 实时浏览器预览
Android 实时浏览器预览即将推出
物理设备访问
使用 Expo Go 或开发构建的 Metro 快速刷新

使用 EAS Build 来创建可安装的构建,并使用本地设备工具来处理实体设备。

🌐 Use EAS Build to create installable builds, and use local device tooling for physical devices.

下一步

🌐 Next steps

开始使用

检查访问权限,开始你的第一个会话,然后打开仪表盘和浏览器预览。

运行并控制你的应用

安装本地或 EAS 构建,使用应用,并收集证据。

创建会话链接

构建一个 URL,从 EAS 构建或应用归档中启动浏览器预览。

命令行接口参考

查看实验模拟器的命令、标志、输出和管理的环境文件。

REST API

可以从 CI 或你自己的 HTTP 客户端创建、查看、连接和停止会话。

故障排除

从不可用的账户、过期的会话、断开的隧道和错误的构建中恢复。