7

I am building a simple web app meant to run on iPads mostly. The problem is that the app freezes on Start up if you quickly double tap the home button / tap it while the app displays the start up picture and loads up the content. If you try to open/close the app quickly you might see what I am talking about.

Once the app freezes, it gets stuck on the home screen displaying the content of the main page. Pressing the home button won't bring you back to the home screen. Pressing the power button won't lock the screen either. You have to do a hard reset (press the home button and the lock button at the same time).

I think the problem here might be the start up image. Has anyone come across this?

The testing device is an iPad 3 with iOS 6.0.

Following is the bare bones HTML (which still causes the app to freeze):

<!DOCTYPE html>
<html> 
<head> 
<title>Mobile</title> 
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black" /> 
<meta name="apple-mobile-web-app-capable" content="yes"/>  

<link rel="stylesheet" href="css/main.css" />
<!-- iPad (Retina, landscape) -->
<link rel="apple-touch-startup-image"
  media="(device-width: 768px)
     and (orientation: landscape)
     and (-webkit-device-pixel-ratio: 2)"
  href="apple.png">
</head> 
<body>

Test

</body>
</html>
xited
  • 877
  • 1
  • 10
  • 19
  • Starting with iOS-7, pressing the lock button will still lock the screen and automatic locking still works when frozen this way. But you won’t be able to unlock the device and still need a hard reset (even though it *appears* to be powered off). – binki Dec 12 '13 at 21:48

2 Answers2

3

Getting rid of:

<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />

fixed this same issue for me.

In your case try taking this out:

<meta name="apple-mobile-web-app-status-bar-style" content="black" /> 

Delete the old shortcut and add it again.

2

I have a similar problem which is totally reproducible. It looks like an iOS bug, as when I went onto another well known web app (Financial Times) it does the same thing.

Their answer to this problem seems to be to be... after the initial loading screen they essentially have a second loading screen, a sort of "Please Wait..." message which the user kinda takes the hint and waits for it to finish before doing anything else with their phone.

Indeed, if I let my own app load to the end, close it, go back into it, close it, go back into it, I can't do it enough times to make it happen unless I do it without waiting for it to load.

So the answer (until this bug is resolved from whatever iOS updates resolves it) is to have a very imposing loading screen for like 3 seconds beyond the initial loading screen, thus stopping people from closing it too early.

Come on Apple, I'll love you forever if you can resolve this!