Saad Saqib
Saad Saqib

Reputation: 33

IOS 8 : CLVisit in CoreLocation

I m trying to use new CLVisit feature in my app to monitor user's visit, i followed the WWDC-14 video and implemented every thing, but locationManager:didVisit is not calling at all. I set the NSLocationAlwaysUsageDescription key, enable the "Location updates" background mode in Capabilities, and include the following in ViewDidLoad of my class :

_locationManager = [[CLLocationManager alloc] init];
_locationManager.delegate = self;
[_locationManager requestAlwaysAuthorization];
[_locationManager startMonitoringVisits];

There is no documentation available on min TIME required to stay at specific place for a visit or anything about DISTANCE between places. I tried to test it using GPX file and in the building by staying at different places for more than 10 min, but locationManager:didVisit delegate didn't fired.

Please help me, how to test CLVisits, or if i missed anything in code.

Upvotes: 3

Views: 1662

Answers (1)

I´ve been testing CLVisits with this code and works perfect to monitor my day a day https://github.com/steveschauer/TestCLVisit

Upvotes: 1

Related Questions