【问题标题】:Launch screen appears and disappears again and again when targeting a simulator瞄准模拟器时,启动屏幕一次又一次地出现和消失
【发布时间】:2015-06-04 13:50:36
【问题描述】:

当我启动应用程序时,屏幕出现又消失。我用 UI 自动化写了一个小脚本

instruments -w "iPhone 6 (8.2 Simulator)" -t /Applications/Xcode-beta.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate /Users/me/PATHTO.app -e UIASCRIPT "/Users/me/Documents/Instrument/test.js" -e UIARESULTSPATH "/somewhere"

我收到了这个错误:

instruments[1940:183752] WebKit Threading Violation - initial use of WebKit from a secondary thread.
Instruments Trace Error : Target failed to run: Failed looking up pid of launched process.

有什么想法吗?

【问题讨论】:

标签: ios xcode instruments ui-automation


【解决方案1】:

这可能是最接近于回答以下问题的方式:您是否已确认您的应用在启动期间实际上并未崩溃?与 OS X 不同,iOS 中的崩溃不会很好地宣传自己,因此除非您打开日志,否则通常很难确定崩溃是否真的发生了。

这些并不完全是一个解决方案,但如果应用程序没有崩溃,可能有助于自己调试:

模拟器有自己的控制台日志,其中可能包含有关所发生情况的详细信息,例如提及您的应用异常退出或遇到断言或类似情况。

我相信 WebKit 线程违规是一个红鲱鱼。自 Xcode 6 测试版以来,我一直对 Apple 有一个错误,即使我们现在要使用 Xcode 7.1,仍然没有修复,但据我所知,这只是噪音。我个人在仪器命令行周围有一个包装器,它会将消息从仪器的输出中剥离出来,因为太多人对此感到困惑。

此外,instruments 有一个带有 instruments -v 的详细输出选项,可能会提供更多详细信息。

instruments -v -w "iPhone 6 (8.2 Simulator)" -t /Applications/Xcode-beta.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate /Users/me/PATHTO.app -e UIASCRIPT "/Users/me/Documents/Instrument/test.js" -e UIARESULTSPATH "/somewhere"

【讨论】:

    猜你喜欢
    • 2018-11-29
    • 2019-06-04
    • 2021-11-14
    • 1970-01-01
    • 2017-01-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-04-13
    相关资源
    最近更新 更多