simulator_launch_app
这个 MCP 工具按 bundle ID 启动团队模拟器上已安装的 App,并把它带到前台。
simulator_launch_app 按 bundle ID(来自 simulator_apps)启动团队正在运行的模拟器上已安装的 App,并把它带到前台。它不安装任何内容:不存在的 App 会以 app is not installed on this device 失败。它不删除任何内容。
| 只读 | 破坏性 | 幂等 |
|---|---|---|
| 否 | 否 | 否 |
输入
| 输入 | 类型 | 必填 | 默认值 | 作用 |
|---|---|---|---|---|
teamId |
字符串(UUID) | 是 | — | 团队,来自 list_teams |
simulator |
string | 否 | 团队的默认设备 | 哪种设备,使用 list_simulators 中的 id |
bundleId |
string | 是 | — | App 的 bundle ID,例如 com.example.notes |
结果
| 字段 | 说明 |
|---|---|
ok |
true |
env |
[]:不传递环境变量 |
args |
0:不传递启动参数 |
{ "ok": true, "env": [], "args": 0 }错误
| 消息 | 何时出现 | 怎么办 |
|---|---|---|
| bundleId is required. | 缺少 bundleId,或它为空 |
发送 bundle ID |
| app is not installed on this device | 没有安装该 bundle ID 的 App | 检查 simulator_apps,或用 simulator_install_app 安装 |
另外还有每个模拟器工具都可能返回的错误:见 start_simulator。
示例
{"name": "simulator_launch_app", "arguments": {"teamId": "00000000-0000-0000-0000-000000000000", "bundleId": "com.example.notes"}}