当瞄准模拟器时,启动屏幕一次又一次地出现和消失



当我启动应用程序时,屏幕再次出现并消失。我用UI Automation 写了一个小脚本

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.

有什么想法吗?

这可能是最接近回答这个问题的:你是否验证了你的应用程序在发布过程中没有崩溃?与OS X不同,iOS中的崩溃不会很好地宣传自己,所以除非打开日志,否则通常很难弄清楚崩溃是否真的发生了。

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

模拟器有自己的控制台日志,其中可能包含发生的事情的详细信息,比如提到你的应用程序异常退出或命中断言之类的事情。

我认为WebKit线程冲突是在转移注意力。自从Xcode 6测试版以来,我在苹果公司遇到了一个关于它的错误,仍然没有修复,甚至认为我们现在是Xcode 7.1,但据我所知,这只是噪音。我个人在仪器命令行周围有一个包装器,它会将信息从仪器的输出中删除,因为太多人对此感到困惑。

此外,仪器有一个详细的输出选项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"

相关内容

最新更新