SuperAPI AI 工具集

baguette-ios-simulator

通用与其它

查看项目

更新于 10-15 22:34

技能介绍

用途:Baguette 用于在无 GUI(headless)方式下创建、启动和关闭 iOS 模拟器,串流屏幕并进行触摸手势注入,适合自动化测试与设备农场场景。

主要能力: 设备管理:list、boot、shutdown。 屏幕串流:stream 支持 mjpeg(默认)与 avcc 格式,可设 --fps,MJPEG 可管道给 ffplay 预览。 一次性手势:tap、swipe、pinch、pan,以及 press 硬件按钮(home、lock)。 流式手势输入:通过 stdin 向 baguette input 发送换行分隔 JSON,每条返回 {"ok":true} 或错误。 Web UI 服务:serve 默认端口 8421,提供 /simulators(单设备)、/farm(多设备农场)页面及 boot/shutdown 等 HTTP 路由。 WebSocket:ws://localhost:8421/simulators/<UDID>/stream?format=mjpeg|avcc,可接收二进制帧,并回传 set_bitrate、set_fps、set_scale、force_idr、snapshot 以及手势 JSON。 Chrome/Bezel:chrome layout 输出边框布局 JSON,chrome composite 输出叠加边框的 PNG。

安装:brew install tddworks/tap/baguette;源码构建 git clone https://github.com/tddworks/baguette 后执行 make,测试用 swift test。

限制:仅限 Apple Silicon Mac;需 macOS 15+ 与 Xcode 26(依赖私有 SimulatorKit/CoreSimulator 框架)。手势坐标须为设备点而非像素,--width/--height 需匹配实际屏幕点尺寸;iOS 26 下 press 仅支持 home 与 lock。其他平台与参数暂未提供。