Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implementing Multitasking on an iPhone/iOS4 Web App

I am looking to build a web app that implements background audio and fast app switching. These features work out of the box, when run as regular Safari web pages, but as soon as you add the web-app-capable tag, and try to run in full screen mode, this functionality breaks.

I did some testing and even the most basic web app will reload every time when you switch back to it. And seeing as it's a web app, we can't exactly implement the multitasking API. Has anyone found a work around?

This isn't a deal-breaker, as you can just avoid full screen mode, but then you also lose the ability to use your own icon in the app switch tray. Perhaps this explains a lack of full screen mode in YouTube's new web app....

like image 238
Peter Watts Avatar asked Nov 06 '22 11:11

Peter Watts


1 Answers

For future reference, this does not seem to be possible.

My theory is that when you enable full screen mode on an iPhone app, it creates a very simple native app that consists of a single Web UI view. Unfortunately, this simple native app does not have any complex functionality (multitasking, background audio), nor is there any way to add it.

If you don't add full screen mode, the web app acts as a shortcut to Safari and seeing as it is running inside Safari, you get all the functionality that is built into it. So if you want multitasking or background audio, you cannot enable full screen mode.

Hope that helps someone else wondering the same thing.

like image 63
Peter Watts Avatar answered Nov 12 '22 16:11

Peter Watts