Hey I developed a commercial app using HTML5, jquerymobile, it’s currently live/in-production and thanks to IOS6 separating the shared local storage (HTML5), I can no longer carry data over from Safari to home screen like I was before.
I used to set localStorage in Safari then the Home screen app would pick it up, this doesn’t work in IOS6.
How can I get this to work in IOS6 without creating a whole new feature/process? I’m thinking my options are:
-
Maintain the value in the query string, so that when the user loads the app, the value is in the query string, then I can set it to localStorage from that value, when the app loads in App-mode for the first time.
-
Store the value in the cache manifest (although it would need to be dynamically set, as its a user auth token, specific to each user, so don’t know if that is even possible to have dynamic data there?). And don’t know if the cache manifest is shared by Safari and app-mode?
Any help would be appreciated, it’s very severe obviously because 50% of our users can’t use our App anymore.
Thanks!
So I fixed this and deployed to live and its all working fine. It’s far from an elegant fix, but for users who built their Application around this functionality there isn’t much else you can do. I just carry the variable (I want to pass to App-Mode) around on the querystring for each page request. Then when the user adds to home screen, that same URL is loaded and you can retrieve the variable that way.
It’s fairly easy to do using jquery mobile, just have a common function for all
$.changepageyou do programatically and slip it in, then have a common function which executes on the pageshow event for all pages which adds it as a suffix to all links.