iOS开发iOS

iOS 安装App到模拟器上

2017-07-30  本文已影响2918人  終于

我能说我想在电脑的模拟器上看新闻了吗。。。哇哈哈哈

如果自己用命令行打包的应该对xcodebuild和xcrun 这两个不陌生,我们今天就用xcrun,可以理解为它就是把xcodebuild打包的.app签名啊什么的打包成我们用的.ipa包。

Step1.查看基本命令:

xcrun instruments -help

输出信息:usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument ...]]]

可以看出 -w就是我们需要的,先启动模拟器,当然你也可以自己启动。

Step2.运行模拟器:

xcrun instruments -w 'iPhone SE'

输出信息:Waiting for device to boot...

Instruments Usage Error: No template (-t) specified

instruments, version 8.3.3 (62125)

这个-t 还不知道传入什么参数。。。

Step3.安装App到模拟器中

xcrun simctl install booted [...  .app的路径]

PS.卸载模拟器中App

xcrun simctl uninstall booted [... bundle identifier]

上一篇 下一篇

猜你喜欢

热点阅读