nickoneill / PermissionScope

Intelligent iOS permissions UI and unified API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handling restart of app after switching permissions

tuxtux59 opened this issue · comments

Hi,
I'm facing a problem but this issue could be like a question.
When user access to device settings to switch permissions and back to the app, the app restarted without keeping it's state.
So if user was in a deep state of the app he has to go back to this deep state to continue the process i tried to do before app ask him to allow some permissions.
Is there a code for permissionscope to let app restart from the previous state where show() function was called?
I think that we won't have to store app state in something like user preferences and test it on start!

I'm fan of this library and I think this function (if it's not already present) could be great for futures integrations.

Thanks

Hi tux,

Why not just call show() again ? PScope will just need to re-check the configured permissions' current status

My problem is that show is called from a deep screen of the app ( like third or fourth screen) so I can't call show() again from a restart of the app due to haven't the previous behavior.
I hope this is understandable !

Permissionscope doesn't manage the state of your app so we can't restore it to the state where you left off when changing something like contacts permission. Luckily this only occurs if a user denies contacts permissions and then has to re-enter settings to turn it on, not on the initial ask.