【问题标题】:xcrun simctl boot / uninstall hang when simulator isn't running模拟器未运行时,xcrun simctl boot / uninstall 挂起
【发布时间】:2016-06-19 12:31:48
【问题描述】:

我正在尝试使用 xcrun simctl 启动设备并卸载应用程序,但它在卸载步骤中挂起

xcrun simctl boot <deviceudid>
xcrun simctl uninstall <deviceudid> <bundleid>

它在卸载时挂起并永远存在......但是,如果我的模拟器已经运行并执行

xcrun simctl uninstall <deviceudid> <bundleid>

它工作正常...但我试图在脚本中执行此操作而无需手动打开模拟器

【问题讨论】:

    标签: ios command-line ios-simulator xcrun simctl


    【解决方案1】:

    发生这种情况是因为当您使用“xcrun simctl boot ...”时,您并没有完全启动模拟器。某些服务(包括系统应用提供的服务,如安装或启动)在此模式下不可用。

    如果您想编写完整启动设备的脚本,您可能需要参考我在Xcode 6 - Launch simulator from command line 中的回答

    【讨论】:

    • 所以从设备上实际卸载应用程序的唯一方法是先使用 open -a Simulator 打开模拟器?
    • 要么,要么你可以使用'xcrun simctl erase ...'将设备擦除到默认状态。
    • 感谢您的回复...不幸的是,我认为这会删除所有内容...不仅仅是我要卸载的应用程序
    • 是的。这些是您目前的选择。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-10
    • 1970-01-01
    • 1970-01-01
    • 2023-03-30
    • 2023-02-10
    • 2015-05-11
    相关资源
    最近更新 更多