操作步骤
- 获取appium的webdriveragent(应该Airtest的 iOS-tagent最高支持的Xcode是12.1,和当前mac系统不兼容)
git clone https://github.com/appium/WebDriverAgent
- 安装Xcode
- 打开 webdriveragent / WebDriverAgent.xcodeproj,设置WedDriverAgentLib -> signing & capabilities 和WedDriverAgent Runner -> signing & capabilities中的team
- Product -schema 选择 webDriverAgentRunner
- Product - destination 选择设备
- product - test 运行成功
- 安装代理 brew install libimobiledevice 并且设置 iproxy 8100 8100
- 即可通过airetest IDE连接 iPhone,地址http://127.0.0.1:8100 (以上操作完后,会在iPhone上安装一个webdriveragentrunner,之后运行这个app后,airtest IDE即可连接)
通过windows链接
- wdaproxy 安装,安装命令:
brew install openatx/tap/wdaproxy
- 获取设备的UDID(需要iPhone通过数据线连接电脑)
UDID=$(idevice_id -l | head -n1)
运行:wdaproxy -p 8100 -u $UDID