ios-simulator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

iOS Simulator

iOS Simulator

Use
agent-device
on an iOS Simulator to verify a running app. Work from the live UI, act on current refs or selectors, and verify the result before closing the session.
For an app or bundle id, open it in the foreground:
bash
agent-device open <app-or-bundle-id> --platform ios --foreground
open
returns the initial interactive snapshot. Use its current refs or a selector. For a planned action, use
--settle
. If the settled diff shows the next target, continue from it:
bash
agent-device press @eN --settle
agent-device fill @eN "text" --settle
Run
agent-device snapshot -i
only when the settled diff does not show the next target.
type
never takes
--settle
; verify it with a snapshot or named
wait
. Keep state-changing commands serial. Verify the end state with a selector or exact text, then close:
bash
agent-device close
For non-routine work, use the version-matched CLI help:
bash
agent-device help validate
Read only the relevant follow-up topic for specialized work:
bash
agent-device help debugging       # screenshots, logs, traces, video, and failures
agent-device help react-native    # React Native and Expo runtime guidance
agent-device help react-devtools  # component tree, props/state/hooks, and renders
agent-device help scripting       # durable replay and CI workflows
If platform help says a capability is unavailable, follow it. Keep diagnostic output when verification fails.
使用
agent-device
在iOS Simulator上验证运行中的应用。基于实时UI操作,针对当前引用或选择器执行操作,并在关闭会话前验证结果。
针对应用或bundle ID,将其在前台打开:
bash
agent-device open <app-or-bundle-id> --platform ios --foreground
open
命令会返回初始交互式快照。使用其当前引用或选择器。若要执行计划操作,请使用
--settle
参数。如果稳定后的差异显示了下一个目标,请基于此继续操作:
bash
agent-device press @eN --settle
agent-device fill @eN "text" --settle
仅当稳定后的差异未显示下一个目标时,才运行
agent-device snapshot -i
type
命令从不接受
--settle
参数;请通过快照或命名的
wait
命令验证其结果。保持状态变更命令串行执行。使用选择器或精确文本验证最终状态,然后关闭会话:
bash
agent-device close
对于非常规工作,请使用版本匹配的CLI帮助:
bash
agent-device help validate
仅阅读专业工作相关的后续主题:
bash
agent-device help debugging       # screenshots, logs, traces, video, and failures
agent-device help react-native    # React Native and Expo runtime guidance
agent-device help react-devtools  # component tree, props/state/hooks, and renders
agent-device help scripting       # durable replay and CI workflows
如果平台帮助显示某项功能不可用,请遵循其指引。当验证失败时,请保留诊断输出。