libimobiledevice
安装与卸载
ideviceinstaller -i xxx.ipa
ideviceinstaller -u [bundleID]
ideviceinstaller -u [udid] -l
ideviceinstaller -u [udid] -l -o list_system
ideviceinstaller -u [udid] -l -o list_all
列出本机模拟器及连接设备的信息
instruments -s devices
查看连接设备信息
idevice_id -l
ideviceinfo
ideviceinfo -k ProductVersion
ideviceinfo -u [udid]
ideviceinfo -u [udid] -k DeviceName
idevicename -u [udid]
ideviceinfo -u [udid] -k ProductVersion
ideviceinfo -u [udid] -k ProductType
ideviceinfo -u [udid] -k ProductName
备份
idevicebackup
获取系统崩溃日志
idevicecrashreport
远程调试代理
idevicedebugserverproxy
获取设备时间
idevicedate
重启设备
idevicedignostices restart
截屏
idevicescreenshot /Users/medivh/Desktop/a.png
日志
idevicesyslog
idevicesyslog -u [udid] > /Users/home/Desktop/log.log
bundleID
unzip xxx.ipa
cd Payload/xxx.app
defaults read `pwd`/Info CFBundleIdentifier
show SDK
xcodebuild -showsdks
开启指定模拟器
xcrun instruments -w 'iPhone 7 Plus (11.4) [$uuid]'
安装指定app
xcrun simctl install booted <app path>
运行指定app (com.example.app)
xcrun simctl launch booted <bundleID>
卸载指定应用
xcrun simctl uninstall booted <bundleID>
appium inspector 这个基本没法用
app-inspector -u $uuid/udid
appium-desktop inspector 这个最好用了
1、打开appium-desktop,start;
2、菜单栏->Appium->new session window;
3、saved capabillity sets中设置参数, host:127.0.0.1:4723/wd/hub,
devices = {
"platformName": "iOS",
"deviceName": "iPhone 6",
"platformVersion": "11.0",
"bundleId": "com.chezhubang",
"automationName": "XCUITest",
"udid": "2aeda56a9b8c38eacb6ff8055ecce4998174cd0f"};
4、start session;
xcodebuild
UDID=$(idevice_id -l)
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination "id=$UDID" test
wda inspector 这个相对好用一点
UDID=$(idevice_id -l)
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination "id=$UDID" test
https://[ip]/inspector
iproxy
iproxy [port] [port]
查看设备的描述文件
ideviceprovision list