简体   繁体   English

trigger.io在iOS中的启动画面上挂起

[英]trigger.io hangs on splash screen in iOS

Oftentimes my app will hang on the "trigger.io FORGE" splash screen and never display my UI. 我的应用程序通常会挂在“trigger.io FORGE”启动画面上,并且永远不会显示我的UI。

I have this happening both in the simulator and on a real device. 我在模拟器和真实设备上都发生过这种情况。 It's intermittent which leads me to think maybe it's a race condition somewhere (do I need to be waiting for forge to initialize?). 这是间歇性的,这让我觉得它可能是某个地方的竞争条件(我是否需要等待伪造初始化?)。

I have no idea how to debug this as the trigger console isn't spitting out an error even when showing the debug output. 我不知道如何调试它,因为即使显示调试输出,触发器控制台也没有吐出错误。

Anything I should check? 我应该检查一下吗? It's weird because if I put in a call like this: 这很奇怪,因为如果我这样打电话:

setInterval(function() {
    forge.logging.log('hi');
}, 1000);`

I can see that my JavaScript code is being executed (and continues to execute as this is successfully logged until I kill the app).. but it's still hung on the splash screen. 我可以看到我的JavaScript代码正在执行(并且继续执行,因为这已成功记录,直到我杀死应用程序).​​.但它仍然挂在启动屏幕上。 Oftentimes hitting the home button and re-entering the app will work. 经常点击主页按钮并重新进入应用程序将起作用。 But sometimes it takes a few rebuilds before it will get past the splash screen. 但有时需要进行一些重建才能通过启动画面。

I've now seen this on 2 different dev environments, 2 different physical devices, and the iOS simulator. 我现在已经在2个不同的开发环境,2个不同的物理设备和iOS模拟器上看到了这个。

This sounds like a rare issue on iOS that causes the DOM event Forge listens for to hide the splash screen not to fire. 这听起来像iOS上一个罕见的问题导致DOM事件Forge侦听隐藏启动屏幕而不是触发。

The easiest way to fix this is to make sure the splash screen is hidden by calling forge.launchimage.hide() at the point your code is ready. 解决此问题的最简单方法是通过在代码准备就绪时调用forge.launchimage.hide()来确保隐藏启动屏幕。 See http://docs.trigger.io/en/v1.4/modules/launchimage.html#hide for more details. 有关详细信息,请参阅http://docs.trigger.io/en/v1.4/modules/launchimage.html#hide

If that doesn't help then let us know and we can try to track down what else it could be. 如果这没有帮助,请告诉我们,我们可以尝试追踪它可能是什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM