1. 列出安装的可用的模拟器: xcrun instruments -s

【如:iPhone 5s (9.0) [00AB3BB6-C5DC-45C7-804F-6B88F57C2AFF] (Simulator)】

1. 查看已安装的模拟器: ios-sim showdevicetypes

【如:iPhone-6s, 11.1
iPhone-6s, 10.0
iPhone-6s, 9.0
iPhone-6s, 11.2
iPhone-6s, 10.1
iPhone-6s, 9.2】

1. 查看已安装的模拟器: xcrun simctl list

【如:
-- iOS 11.3 --
iPhone 5s (9ABF3B1A-4A86-4BAC-BBB2-5D63CC30F0DE) (Shutdown)】
查看启动的模拟器 xcrun simctl list | grep Booted

2. 开启上面列表中指定的模拟器: xcrun instruments -w "iPhone 8(11.2)"

2. 开启指定的模拟器: xcrun simctl boot udid

3. 关掉模拟器: xcrun simctl shutdown udid

关掉所有打开的模拟器: xcrun simctl shutdown all

4. 重置模拟器(清除模拟器的数据和设置)xcrun simctl erase udid

5. 安装指定app: xcrun simctl install booted <app路径>

多设备时:xcrun simctl install <device> <app路径>

5. 安装指定app: ios-sim launch /Users/nali/Desktop/ting.app --devicetypeid iPhone-X, 11.2

6. 运行指定的app: xcrun simctl launch booted <bundle identifier>

多设备时:xcrun simctl launch <device> <bundle identifier>

7. 关闭已经打开的应用: xcrun simctl terminate booted <bundle identifer>

多设备时:xcrun simctl terminate <device> <bundle identifier>

8. 卸载指定应用: xcrun simctl uninstall booted <bundle identifer>

多设备时:xcrun simctl uninstall <device> <bundle identifier>

9. 截图:xcrun simctl io booted screenshot screenshot.png

会发现在当前目录下会多了一张照片

多设备时: xcrun simctl io <device> screenshot screenshot.png

10. 录屏:xcrun simctl io booted recordVideo example.mp4

多设备时:xcrun simctl io <device> recordVideo example.mp4

11. 日志: tail -f <filename>

日志文件的路径:
/Users/$UserName/Library/Logs/CoreSimulator/$simulator_hash/system.log

12. 更多

 
 

iOS模拟器命令xcrun simctl系列(自动化测试)的更多相关文章

  1. ios模拟器命令

    xcrun simctl list  //显示模拟器列表 xcrun simctl boot [模拟器id] //启动模拟器

  2. ios模拟器安装测试包方法

    1. 使用ios-sim ios-sim是一个可以用命令空着ios模拟器的工具.利用这个命令,我们可以启动模拟器.安装app.启动app.查询ios sdk,它可以使我们像自动化测试一样打开xcode ...

  3. iOS 模拟器变的很多的问题

    运行一下命令 xcrun simctl list devices | grep -v '^[-=]' | cut -d "(" -f2 | cut -d ")" ...

  4. Mac下启动iOS模拟器

    终端列出你安装的所有可用的设备xcrun instruments -s 或 xcrun simctl list 启动方式一: 先启动模拟器:open -a Simulator,这时会以默认的iOS系统 ...

  5. ios模拟器安装.app

    相对于xcode的run,然后再在安装到模拟器上测试,如果是个人开发的话,那还好. 要是是团队开发,那每次其他的童鞋就都需要update最新的文件下来再编译运行了. 而且,一些测试的童鞋也不会打开xc ...

  6. 给iOS 模拟器“安装”app文件

    前言 刚刚接触iOS的时候,我就一直很好奇,模拟器上面能不能直接安装app呢?如果可以,我们就直接在模拟器上面聊QQ和微信了.直到昨天和朋友们聊到了这个话题,没有想到还真的可以给模拟器“安装”app! ...

  7. iOS 模拟器“安装”app

    1.首先在模拟器上运行我们的app程序 2.执行以下命令: ditto -ck --sequesterRsrc --keepParent `ls - -d -t ~/Library/Developer ...

  8. terminal中 启动ios模拟器,并安装软件

    启动运行模拟器: xcrun instruments -w 'iPhone 6 Plus' 在已经启动好的模拟器中安装应用: xcrun simctl install booted Calculato ...

  9. Mac下搭建Appnium+Python+Ios模拟器环境

    转载:https://www.jianshu.com/p/f7cf077d9444 https://blog.csdn.net/a158123/article/details/79684499 htt ...

随机推荐

  1. springboot整合mybatis分页插件PageHelper

    1 pom文件引入依赖 (注意:pagehelper版本不能太高,楼主之前用的5.0以上的版本,然后分页没有效果,浪费了两个小时才发现这个原因) <!-- mybatis的分页插件 --> ...

  2. 【转载】Vue 2.x 实战之后台管理系统开发(二)

    2. 常见需求 01. 父子组件通信 a. 父 -> 子(父组件传递数据给子组件) 使用 props,具体查看文档 - 使用 Prop 传递数据(cn.vuejs.org/v2/guide/co ...

  3. Response.cookies和Request.cookies

    Response.cookies和Request.cookies的区别很重要,由于方法基本都是差不多的,特别对于初学者而言,很容易出现混淆. 简单说就是创建cookie用response,获取cook ...

  4. (JSP)关于手机端(尤其是苹果手机)pdf文件无法打开的解决方案

    流的方式下载附件 <!-- @author :daisy @date : 2011-12-04 @note : 从数据库中读取BLOB图片显示 --> <%@page import= ...

  5. Guava学习笔记之Maps(1):Maps.uniqueIndex(Iterable, Function)

    Guava官方文档 https://github.com/google/guava/wiki/CollectionUtilitiesExplained 官方文档这样描述: [`Maps.uniqueI ...

  6. 令人头疼的Connection Reset

    背景: 要爬取某网站的数据,数据每页10条,有很多页(形式如同table表格).使用HttpClient 逐行逐页爬取数据,但在循环爬取多次时,总会在不确定的位置报错 在检查代码逻辑无果之后,开始疯狂 ...

  7. 判断是手机端还是电脑端 isMobile()

    1.在PublicController控制器中写好判断手机端方法. <?php namespace Home\Controller; use Think\Controller; class Pu ...

  8. Vue组件通讯

    Vue最常用的组件通讯有三种:父->子组件通讯.子->父组件通讯,兄弟组件通讯.(template用的pug模板语法) 1.父->子组件通讯 父->子组件通讯,是通过props ...

  9. Ajax的初体验

    一.AJAX的介绍 Ajax 即“Asynchronous Javascript And XML”(异步 JavaScript 和 XML),是指一种创建交互式网页应用的网页开发技术. Ajax =  ...

  10. IEC_62304_CheckList

    IEC 62304 Reference Software Lifecycle Process Applicable for Class A Class B Class C PRIMARY LIFECY ...