我能說(shuō)我想在電腦的模擬器上看新聞了嗎越妈。季俩。。哇哈哈哈
如果自己用命令行打包的應(yīng)該對(duì)xcodebuild和xcrun 這兩個(gè)不陌生梅掠,我們今天就用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就是我們需要的阎抒,先啟動(dòng)模擬器酪我,當(dāng)然你也可以自己?jiǎn)?dòng)。
Step2.運(yùn)行模擬器:
xcrun instruments -w 'iPhone SE'
輸出信息:Waiting for device to boot...
Instruments Usage Error: No template (-t) specified
instruments, version 8.3.3 (62125)
這個(gè)-t 還不知道傳入什么參數(shù)且叁。都哭。。
Step3.安裝App到模擬器中
xcrun simctl install booted [...? .app的路徑]
PS.卸載模擬器中App
xcrun simctl uninstall booted [... bundle identifier]