As you may be aware, when you add a web page to the home screen of an iOS device it creates a "web clip". When launched from this icon on the home screen, the site is loaded in Safari in "web app mode". There are several advantages to this such as going full screen and feeling more like an app and less like a web page.
However, there is a major downside to this. When you switch to another app on your iPhone then switch back to this "web app", the state of the app is completely lost. According to several sources on the web, this is by design. The reasoning by Apple is that they need to be shut down your app to keep resources manageable. It is the responsibility of the app developer to save state and restore state when the app is reopened.
OK. I can accept that and I am almost there. I am tracking the user's logged in security token, so they don't need to login again. I also store the current hash so I if I detect that they are launching from with no referrer, I can send them to the same hash they were viewing when they left.
All is good.... EXCEPT back buttons don't work. If the user was on a mobile view that had a back button, when the user multi-tasked away from it, then I will, of course, take them back to that page. However, because there is no history, the Kendo UI mobile back button doesn't know what to do.
So... how can I save off the current navigation history to localStorage and how can I restore it when relaunching the app?
I see that app.pane.history has been deprecated. This use case of an iOS web app launched from home screen seems pretty mainstream, so what is your current solution to this situation now that app.pane.history has been deprecated.
Thanks,
Ty.
However, there is a major downside to this. When you switch to another app on your iPhone then switch back to this "web app", the state of the app is completely lost. According to several sources on the web, this is by design. The reasoning by Apple is that they need to be shut down your app to keep resources manageable. It is the responsibility of the app developer to save state and restore state when the app is reopened.
OK. I can accept that and I am almost there. I am tracking the user's logged in security token, so they don't need to login again. I also store the current hash so I if I detect that they are launching from with no referrer, I can send them to the same hash they were viewing when they left.
All is good.... EXCEPT back buttons don't work. If the user was on a mobile view that had a back button, when the user multi-tasked away from it, then I will, of course, take them back to that page. However, because there is no history, the Kendo UI mobile back button doesn't know what to do.
So... how can I save off the current navigation history to localStorage and how can I restore it when relaunching the app?
I see that app.pane.history has been deprecated. This use case of an iOS web app launched from home screen seems pretty mainstream, so what is your current solution to this situation now that app.pane.history has been deprecated.
Thanks,
Ty.