michalchudziak / react-native-geolocation

Geolocation APIs for React Native
MIT License
1.27k stars 219 forks source link

Passing enableBackgroundLocationUpdates is ignored #316

Open tanoc opened 1 month ago

tanoc commented 1 month ago

Platforms

iOS

Versions

Description

It looks like the function converting between the js dictionary and the RNCGeolocationConfiguration struct does not set enableBackgroundLocationUpdates:

https://github.com/michalchudziak/react-native-geolocation/blob/7bd62fd3cc2898a11d9ded1ad7840d849b8a5a82/ios/RNCGeolocation.mm#L61-L69

I notice this because enableBackgroundLocationUpdates is never called with skipPermissionRequests set to true because _locationConfiguration.enableBackgroundLocationUpdates is always set to false

https://github.com/michalchudziak/react-native-geolocation/blob/7bd62fd3cc2898a11d9ded1ad7840d849b8a5a82/ios/RNCGeolocation.mm#L176-L180