-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MMELocationManagerRegionIdentifier.fence.center called at 10Hz #148
Comments
Thanks @lefleets - I'm going to transfer this issue to our https://github.com/mapbox/mapbox-events-ios/ repo and we can investigate further. /cc @alfwatt |
Thank you for a detailed report and test case, I agree that 10Hz updates aren't expected! Do you ever see a region monitoring update that's not immediately preceded by a location update? In my testing I see pairs, which is what I expect, the region is updated after the location is updated but not in every update case:
|
Hi! Thanks for taking a look. So, I'm not sure if I understand your question, but I take it that you're implying the MME region is updated with new location info when Haven't seen the volume of log messages this weekend anywhere near 10Hz, but am noticing that certain devices get on a roll of logging the call which I think means the device is in motion. So, clearly the MME region doesn't get overwritten every single time my instance of |
I can confirm that I have the same exact problem. MapBox is setting a geofence with the identifier "MMELocationManagerRegionIdentifier.fence.center" continuously. |
@Novecento88 we use the geofence in order to save battery by preventing updates when devices aren't moving around, you can see in MMELocationManager that it's updated in response to Depending on how your app configures it's
@lefleets The distance filter is set by default but that should be overridden by any changes you make to the |
How can I disable this geofence (if possible)? (Sorry if I answer this late) |
@Novecento88 It is not possible to disable our geofence, it's necessary for battery savings. If you haven't tried this already; I would recommend that you add a filter on your |
Hello!
My instance of
CLLocationManager
is having its delegate methoddidStartMonitoringFor region: CLRegion
called with a region identifier ofMMELocationManagerRegionIdentifier.fence.center
- to me, that means it's coming from aCLLocationManager
instance existing onMMELocationManager
withinMGLMapView
.My issue is the sheer volume of calls that are made. It happens with a period of from 1 second to 10 seconds, and in some cases it can go out of control and is called up to 10 times per second, on one device.
It's critical for me to be able to monitor region identifiers of my app in the field, which is how I noticed since my logs are almost entirely this same call. I could filter it out, but it seems like a bug to me and I wanted to share because I really love the Mapbox product and look forward to integrating it in this project for keeps.
Repro project on GitHub is here. This is my first try pushing an Xcode project repository - If you have any feedback please fire away.
Notes
CoreLocation
to monitor this region at 10Hz.Steps to Reproduce
Expected Behaviour
The region
MMELocationManagerRegionIdentifier.fence.center
should only be registered withCLLocationManager
'smonitoredRegions
once.Actual Behaviour
The delegate method is called as often as 10 times per second.
Configuration
The text was updated successfully, but these errors were encountered: