Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPad Web App freezes on Startup

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>
like image 582
xited Avatar asked Oct 01 '12 20:10

xited


People also ask

Why does the web page keep crashing on my iPad?

Safari accumulates caches, browsing history, cookies, and other data in the iPhone or iPad. Sometimes that data can interfere with app functionality, so clearing it out can be a remedy to problems with the app crashing or stalling on some web sites.

Why do the apps on my iPad keep freezing?

Freezing and crashing apps are usually due to memory-related issues like when the device is running low on internal storage. The same thing can happen if the application gets corrupted after installing updates and likewise when an app isn't up-to-date.

Why does my app crash as soon as I open it?

Apps on Android can crash because of low storage space, too many apps running simultaneously, a weak internet connection, or not having the proper app updates installed.


2 Answers

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.

like image 162
chris mackintosh Avatar answered Oct 24 '22 04:10

chris mackintosh


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!

like image 2
user2302379 Avatar answered Oct 24 '22 06:10

user2302379