4

Oftentimes my app will hang on the "trigger.io FORGE" splash screen and never display my 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. 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.

4

1 回答 1

4

这听起来像是 iOS 上的一个罕见问题,它会导致 Forge 侦听的 DOM 事件隐藏启动屏幕而不触发。

forge.launchimage.hide()解决此问题的最简单方法是通过在代码准备好时调用来确保隐藏启动画面。有关详细信息,请参阅http://docs.trigger.io/en/v1.4/modules/launchimage.html#hide 。

如果这没有帮助,那么让我们知道,我们可以尝试找出它可能是什么。

于 2012-11-27T22:30:52.230 回答