Open alexcroox opened 1 year ago
that a very good one, i have look but i don't know how to do it for now :)
I wonder how Codepush does it? Do they maybe grab window.location.pathname
before the install, and send the webview there after install?
I don't know also yesterday looking into that i was wondering how to handle if you removed the path the user was in
Yeah it’s a good point. Definitely a config option you’d want to leave up to the developer so they can think to handle that in the future if they enable it
Adding note from our previous discussion on Discord. Perhaps we could allow the plugin to persist some state (a JS object) when setting the new version, which is then retrievable via new function or .current()?
e.g
CapacitorUpdater.set({ id: data.id, state: { exampleRedirectMeToPathAfterInstallKey: '/platform/dashboard' })
The challenge will be deciding where to retrieve this state, and how to delete it so old state isn't accessed in future updates if state isn't set next time (could it be versioned?)
Feature Request
Description
With MS App Center's Codepush, once an update was installed, the current page/route would remain. This means when the user returns back to bring the app into focus, they won't realise anything happened.
Currently Capgo goes to the root (/) which for me is a login screen and I'd rather the user could continue where they left off.
Platform(s)
ios/android
Alternatives
If this isn't possible I could save current path before calling
CapacitorUpdater.set()
, then redirect to the path after install