More details in the linked issue, but in short - location update data received from Mapbox can contain invalid values that could potentially cause crashes (infinite value for speed etc.)
This PR adds a mechanism for sanitizing and validating this data, so that where possible all the non-critical parts of a location update get assigned a default -1 value (which is a value that the docs for the CoreLocation's CLLocation expect in cases like this).
If a critical part of a location update is invalid (latitude, longitude, altitude or a timestamp), then we "swallow" that update and log an event, instead of risking crashes.
Resolves #520
More details in the linked issue, but in short - location update data received from Mapbox can contain invalid values that could potentially cause crashes (infinite value for
speed
etc.)This PR adds a mechanism for sanitizing and validating this data, so that where possible all the non-critical parts of a location update get assigned a default
-1
value (which is a value that the docs for the CoreLocation'sCLLocation
expect in cases like this).If a critical part of a location update is invalid (latitude, longitude, altitude or a timestamp), then we "swallow" that update and log an event, instead of risking crashes.