zoukankan      html  css  js  c++  java
  • libimobiledevice

    #### 安装与卸载

    ```bash
    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 # 查看指定设备安装的所有应用
    ```

    #### 列出本机模拟器及连接设备的信息
    ```bash
    instruments -s devices
    ```

    #### 查看连接设备信息
    ```bash
    idevice_id -l # 打印当前已连接设备的udid
    ideviceinfo # 打印设备信息
    ideviceinfo -k ProductVersion # 获取连接设备的系统版本号
    ideviceinfo -u [udid] # 指定设备,获取设备信息
    ideviceinfo -u [udid] -k DeviceName # 指定设备,获取设备名称:iPhone6s
    idevicename -u [udid] # 指定设备,获取设备名称:iPhone6s
    ideviceinfo -u [udid] -k ProductVersion # 指定设备,获取设备版本:10.3.1
    ideviceinfo -u [udid] -k ProductType # 指定设备,获取设备类型:iPhone8,1
    ideviceinfo -u [udid] -k ProductName # 指定设备,获取设备系统名称:iPhone OS
    ```

    #### 备份
    ```bash
    idevicebackup
    ```

    #### 获取系统崩溃日志
    ```bash
    idevicecrashreport
    ```

    #### 远程调试代理
    ```bash
    idevicedebugserverproxy
    ```

    #### 获取设备时间
    ```bash
    idevicedate
    ```

    #### 重启设备
    ```bash
    idevicedignostices restart
    ```

    #### 截屏
    ```bash
    idevicescreenshot /Users/medivh/Desktop/a.png # 将文件输入到指定路径
    ```

    #### 日志
    ```bash
    idevicesyslog # 日志输出到屏幕
    idevicesyslog -u [udid] > /Users/home/Desktop/log.log # 将日志输出到指定路径
    ```

    #### bundleID
    ```bash
    unzip xxx.ipa
    cd Payload/xxx.app
    defaults read `pwd`/Info CFBundleIdentifier
    ```

    #### show SDK
    ```bash
    xcodebuild -showsdks # 查看本机sdk版本
    ```

    #### 开启指定模拟器
    ```bash
    xcrun instruments -w 'iPhone 7 Plus (11.4) [$uuid]'
    ```

    #### 安装指定app
    ```bash
    xcrun simctl install booted <app path>
    ```

    #### 运行指定app (com.example.app)
    ```bash
    xcrun simctl launch booted <bundleID>
    ```

    #### 卸载指定应用
    ```bash
    xcrun simctl uninstall booted <bundleID>
    ```

    ### appium inspector 这个基本没法用
    ```bash
    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
    ```bash
    UDID=$(idevice_id -l)
    xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination "id=$UDID" test
    ```

    ### wda inspector 这个相对好用一点
    ```bash
    UDID=$(idevice_id -l)
    xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination "id=$UDID" test
    https://[ip]/inspector
    ```

    ### iproxy
    ```bash
    iproxy [port] [port]
    ```

    ### 查看设备的描述文件
    ```bash
    ideviceprovision list
    ```

  • 相关阅读:
    day08,文件操作。
    day07,基础数据部分的补充
    day06,1,小数据池,常量池。2,编码。
    day05,字典(dic)
    day04,1列表,2列表的增删改查,3列表的嵌套,4元祖,
    day03:python基础数据类型操作(索引,切片,迭代)
    day02_while循环 ,运算符,格式化输出
    变量的命名规则
    Day-23 基础模块4 模块导入_包
    Day-22 基础模块3 正则表达式_re模块
  • 原文地址:https://www.cnblogs.com/medivhxu/p/10939588.html
Copyright © 2011-2022 走看看