Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 230310

iOS plugin for sending user to Settings->Privacy->Location Services?

$
0
0

I am not sure but as answered above by dpa99c1, you may use this plugin to show a native iOS system dialog that will ask to open it for you. It seems the plugin can be implemented by ionic native plugin location accuracy.
Also, please make note that as mentioned in the documentation, there is a scenario in which this plugin fails :

If, upon successfully showing the native dialog, the user presses “Cancel” instead of “Settings”, any subsequent requests via this plugin will not show the dialog again. Ever! This is because iOS assumes that if the user pressed “Cancel”, they don’t want your app to use their location, so iOS prevents you from asking them again to switch on Location Services.
There’s no way to tell which button the user pressed in the native dialog or whether “Cancel” was pressed and the dialog is not being shown.
text`

So you have to handle the exceptions in your app considering this scenario. If the user presses ‘Cancel’ which leads to canRequest() function of this plugin to return false, then you don’t have any choice to open any system dialog, and will then have to return to the same state as you were before implementing this plugin.


Viewing all articles
Browse latest Browse all 230310

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>