1

I am developing an HTML5 game, primarily for iOS. It has a Node.js backend and uses a myriad of technologies, including jQuery, Socket.IO, and the Web Audio API. The game works fine. However, sometimes the device will lock (not freeze). I can play the game as normal, but neither the power nor home button will respond, and though the screen will dim, it will never go off completely. Alternately, sometimes when I push the home button, the apple logo will flash on the screen.

I can not regularly reproduce the error, making it very hard to debug. It seems to happen more frequently if I leave the device alone for several minutes, but sometimes it is fine and sometimes it won't exit.

I have been trying to trace this error for several weeks now. I have tried internet searches, resulting in a few possibilities, but none of the fixes panning out. I do not recall all of the fixes I have tried, but some follow:

  1. Adding a 2 second delay to the io.connect command, to make sure the page is done loading, not just 'ready'.
  2. Disabling "Guided Access" (the symptoms are very similar to having guided access active, and one bug I found said it would sometimes activate).
  3. Replacing instances of "+new Date" with Date.now()

I can not release the full source of the program, and am not sure which specific pieces would be of assistance in debugging it. If you can let me know what sections of the code to share, I could do that though.

Any assistance is greatly appreciated!

Christopher

  • Can you elaborate on #2? Are you saying that your code is invoking Guided Access by itself? – Robot Woods Feb 26 '13 at 01:46
  • the code is causing it to behave as if guided access has been enabled. It is no longer possible to return to the home screen or turn off the device with the power button, but I can still play the game. The only course of action besides playing is to hold both buttons and kill the device. – Christopher Baker Feb 26 '13 at 05:33
  • I haven't tried this with a straight webapp, but maybe give it a try?: http://debug.phonegap.com/ – Robot Woods Feb 26 '13 at 11:47
  • Hope my answer on this post can help you: http://stackoverflow.com/questions/16979274/ios-6-safari-fullscreen-webapp-home-button/17442030#17442030 – rémi Jul 03 '13 at 07:43

0 Answers0