hippware / rn-chat

MIT License
5 stars 0 forks source link

iOS bug related to significant-location-changes #4843

Closed bengtan closed 4 years ago

bengtan commented 4 years ago

There is a bug in the current version of RNBGL and has been around since 3.4.2 ish.

See https://github.com/transistorsoft/react-native-background-geolocation-android/issues/856

[Fixed] iOS bug related to significant-location-changes (SLC) API. In a previous version, the plugin's geofence manager would stop monitoring SLC if the number of added geofences was < the maximum (20) (in order to not show the new iOS 13 dialog reporting background location usage when infinite-geofencing is not required). The background-geolocation SDK uses several CLLocationManager instances and its GeofenceManager maintains its own instance. However, it turns out that when any CLLocationManager instance stops monitoring the SLC API, then ALL instances stop monitoring SLC, which is highly unexpected and undocumented. As a result, the plugin would lose its safety mechanism should the stationary geofence fail to trigger and iOS tracking could fail to start in some circumstances.

The probable fix for this is to upgrade to RNBGL 3.6.x but it, and react-native-background-fetch, are a bit unstable at the moment so we probably need to wait for them to settle before upgrading.

bengtan commented 4 years ago

It's in our app from 4.36.0 onwards, including the Prod (4.36.1) version.

It was introduced in the same RNBGL version that fixed #4595.

bengtan commented 4 years ago

Not QA-able.