Open jhp0621 opened 1 month ago
If you can find a solution I will incorporate it into the plugin. This is probably the best place to start looking: https://github.com/capacitor-community/background-geolocation/blob/fe780a4c8672f7b526792c2815d6e99652a55cd7/ios/Plugin/Plugin.swift#L108-L127.
A temporary fix. What I did is force the user to choose the precision option and always use it when the app is active. This can be achieved using the cordova-diagnostic-plugin plugin but you still have to implement some complex permission request logic.
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:
addWatcher
methodExpected behavior iOS behaves the same way as Android:
error
is present in theaddWatcher
method's callback function if "precise location" is not granted by the userScreenshots If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.