since the only way to restore the state of a web app added to the iOS homescreen is by using routing, I'm searching for a way to store the current route's hash url to localStorage, so I can load it the next time the user opens the app.
The easiest way to store the url is:
However, I need to save this url everytime the app launches a "redirectTo(...)". I didn't find a specific event or a way to intercept it. How do you do it?Code:localStorage.setItem('url', location.hash.substr(1));