capacitor-community / capacitor-community/background-geolocation
Not enabling 'Precise' location on iOS does not error out
- Dominant language
- Java
- Stars
- 249
- Forks
- 79
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
On Android, if I don't provide "precise" location data permission (just "approximate"), the `addWatcher` method returns an error in the callback function with the code "NOT_AUTHORIZED", but on iOS, there is no error and tracking starts. We need precise location for our usage.
**To Reproduce**
Steps to reproduce the behavior:
1. Create an app that uses this plugin
2. Set the `addWatcher` method
3. Allow location permission on the app but not 'precise' (on Android: choose 'approximate'; on iOS: toggle off 'precise location')
4. On an Android device, the plugin throws an error "NOT_AUTHORIZED" but on an iOS device, it does not and the location tracking begins.
**Expected behavior**
iOS behaves the same way as Android: `error` is present in the `addWatcher` method's callback function if "precise location" is not granted by the user
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Smartphone (please complete the following information):**
- Device: iPhone 14 Pro
- OS: iOS17.4.1
**Additional context**
Add any other context about the problem here.
Contributor guide
Assessment
This issue has not been assessed yet.