react-native-geolocation icon indicating copy to clipboard operation
react-native-geolocation copied to clipboard

Passing enableBackgroundLocationUpdates is ignored

Open tanoc opened this issue 1 year ago • 2 comments

Platforms

iOS

Versions

  • react-native-geolocation: 3.2.1
  • react-native: 0.74.1
  • react: 18.2.0

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

tanoc avatar May 23 '24 07:05 tanoc