ionic-team / ionic-team/capacitor-geolocation
Native location request prompt resurfaces immediately after clicking on "Ask next time or when I share" for plugin version >=7.1.0
- Dominant language
- Swift
- Stars
- 12
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
On iOS, in case of version >=7.1.0, if the user clicks on Location enabling button(which calls **Geolocation.requestLocationPermission()** based on permission check) for the first attempt, the native prompt works fine(it appears only on button click which is what I want).
After that, if I go to settings... change the permission to **Never → Foreground the app → Click on location enabling button**(I have made a custom redirect prompt to settings, clicking on yes) **→ Click on Ask next time and foreground app**, I was able to see the native prompt appearing immediately even before clicking on the location enabling button.
Also, >=7.1.0 seems to have some inconsistencies that sometimes doesn’t open the native prompt when I click on the location enabling button.
The location enabling button calls the requestLocationPermission() method in my case when the permission status is **'prompt'** or **'prompt-with-rationale'**.
But if I run the same code on v7.0.0 or below, it gets called only when I click on the location enabling button...which is exactly the behaviour intended to be achieved.
Contributor guide
Assessment
This issue has not been assessed yet.