工具汇总
libimobiledevice:使用本机协议与 iOS 真机设备上的服务进行通信的开源包
ideviceinstaller:用于管理 iOS 设备上的应用程序和应用程序存档的命令行应用程序
xcrun simctl:Xcode自带,用来管理iOS模拟器的库
instruments:Xcode自带性能测试工具,可利用命令行调用
libimobiledevice
Git地址:https://github.com/libimobiledevice/libimobiledevice
常用命令
idevice_id:查看当前已连接的设备的UUID
idevicesyslog:查看系统日志
idevicescreenshot:生成一张当前已连接设备的截图
idevicedate:获取设备时间
ideviceinfo:查看设备信息
ideviceinstaller
Git地址:https://github.com/libimobiledevice/ideviceinstaller
常用命令
ideviceinstaller --list-apps:获取app列表和信息
ideviceinstaller -u [udid] --install [xxx.ipa]:给指定连接的设备安装应用
ideviceinstaller --uninstall [bundle id]:卸载指定应用
xcrun simctl
常用命令
xcrun simctl list:查看设备状态
xcrun simctl boot [UDID]:启动指定设备名称的模拟器
xcrun simctl shutdown [UDID]:关闭指定设备名称的模拟器
xcrun simctl install <uuid> <app路径>:安装APP
xcrun simctl launch <device> <bundle identifier>:启动指定APP
instruments
常用命令
instruments -s devices:获取当前已连接设备
备注:
xcode 13版本后,已废弃 instruments -s devices;采用 xctrace list devices
Instruments -w [UDID] -t "App Launch" -P [bundle id]:指定APP启动instruments进行性能测试,'-t'指定instruments模板,如"App Launch"