Why Core Location skips user movements with CLVisit monitoring turned on

The app I'm working on records information about places where user spends most of his/her time. Core Location's Visits monitoring fulfil all it's requirements in location information absolutely.


While testing this app our QA-engineers revealed evidence that Core Location misses Visits for unknown reason. And this is not a result of low location accuracy. Core Location starts skipping locations registered before without any problems.


To make things clear we've run the test. I installed on his phone our app and example app: https://github.com/steveschauer/TestCLVisit


After 3 days of testing we compared locations from our app, sample app and information from Settings->Privacy->Location Services->System Services->Frequent Locations.


Information from all sources was equal. So we can say that it's not an issue of our app.


But while all locations registered at first day was correct, many locations of second and third day were missed. Only few of them were registered.


Is it normal behaviour for Visits Monitoring? What could be a reason of such skips? Does anybody have negative or positive experience of Visits monitoring?

Replies

Hello Andrey,


did you manage to solve your problem?


It seems we experience the same problem as you do.

I seem to have the same problem. Sometimes visits are not recorded, this seems to have started some time in summer of 2016 while still on iOS 9, and it persists in 10. It's not clear to me if the visit is not recorded of if the app is just not woken up in the background when a visit occurs. It used to work very reliably before.

I reported the bug as rdar://29846075

I see the same problem. It reliably detects when I leave my home, but misses places I stop, even if I am there for 2 hours. I am guessing it may be using wifi location exclusively.


This is unfortunate, as the API would otherwise deliver just what I need. I only care about locations where the user lingers for ~30 minutes or more, but it looks like I will need to activate precision GPS tracking to get that. Not sure if there is a way to sample GPS every 30 minutes, or how much power that would save over continuous tracking.

Hi,

Thanks for help. CLVISIT works when app is in background .

Document suggests it will launch app if user has killed the app, but if i kill the app app dont get launch on visit.

https://developer.apple.com/documentation/corelocation/getting_the_user_s_location/handling_location_events_in_the_background


Do u have any idea ?