ios-deploy使用

ios-deploy也是一个终端安装和调试iPhone应用的是第三方开源库,使用时需要开发者证书和Xcode7以上版本。

1. 安装ios-deploy

我们用npm来安装ios-deploy,如果Mac上没有,先安装node

brew install node

安装node干甚?因为现在版本比较新的node都自带npm哇。
接下来愉快地安装ios-deploy

npm install -g ios-deploy

2. ios-deploy常用命令

2.1 查看连接的设备(包括通过usb和wifi连接的)
ios-deploy -c
2.2 查看通过usb连接的设备
ios-deploy -c --no-wifi
2.3 安装应用到指定设备(其中xxx.app是Xcode编译后的ipa的路径)
ios-deploy --id [udid] --bundle [xxx.app]
2.4 卸载指定设备上的应用(根据包名,也就是bundleId)
ios-deploy --id [udid] --uninstall_only --bundle_id [bundleId]
2.5 查看指定设备上安装的所有应用(包括系统应用和第三方)
ios-deploy --id [udid] --list_bundle_id
2.6 检查指定设备上是否安装了某个应用
ios-deploy --id [udid] --exists --bundle_id

3. ios-deploy的帮助项(Option):

  -d, --debug                  launch the app in lldb after installation
  -i, --id <device_id>         the id of the device to connect to
  -c, --detect                 only detect if the device is connected
  -b, --bundle <bundle.app>    the path to the app bundle to be installed
  -a, --args <args>            command line arguments to pass to the app when launching it
  -t, --timeout <timeout>      number of seconds to wait for a device to be connected
  -u, --unbuffered             don't buffer stdout
  -n, --nostart                do not start the app when debugging
  -I, --noninteractive         start in non interactive mode (quit when app crashes or exits)
  -L, --justlaunch             just launch the app and exit lldb
  -v, --verbose                enable verbose output
  -m, --noinstall              directly start debugging without app install (-d not required)
  -p, --port <number>          port used for device, default: dynamic
  -r, --uninstall              uninstall the app before install (do not use with -m; app cache and data are cleared) 
  -9, --uninstall_only         uninstall the app ONLY. Use only with -1 <bundle_id> 
  -1, --bundle_id <bundle id>  specify bundle id for list and upload
  -l, --list                   list files
  -o, --upload <file>          upload file
  -w, --download               download app tree
  -2, --to <target pathname>   use together with up/download file/tree. specify target
  -D, --mkdir <dir>            make directory on device
  -R, --rm <path>              remove file or directory on device (directories must be empty)
  -V, --version                print the executable version 
  -e, --exists                 check if the app with given bundle_id is installed or not 
  -B, --list_bundle_id         list bundle_id 
  -W, --no-wifi                ignore wifi devices
  --detect_deadlocks <sec>     start printing backtraces for all threads periodically after specific amount of seconds
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 用到的组件 1、通过CocoaPods安装 2、第三方类库安装 3、第三方服务 友盟社会化分享组件 友盟用户反馈 ...
    SunnyLeong阅读 14,966评论 1 180
  • 1、通过CocoaPods安装项目名称项目信息 AFNetworking网络请求组件 FMDB本地数据库组件 SD...
    阳明AI阅读 16,053评论 3 119
  • 阳光透过半扇铁窗,方方斜斜地射在地上。 “吴总,上次和你说的那个项目想得怎么样了?好几十个公司老总还在后面排队等着...
    北斗夜凉阅读 2,972评论 1 4
  • 当我们的亲人因为病痛永远离开我们的时候; 当相爱多年的恋人因为各种原因,不得不放弃对方的时候; 当我们灌注了所有心...
    合一心身健康学院阅读 4,077评论 0 0
  • 离开学校将近两年,最近听说很多朋友,要么有了男朋友,要么有了女朋友了!! 听到这个消息时候,其实也就是欣然一笑,嗯...
    泽芳Zina阅读 3,043评论 0 2

友情链接更多精彩内容