Monday 2 December 2013

iOS development: CLLocationManager gets some problem to monitor regions

By using the CLLocationManager and <CLLocationManagerDelegate>,  people can make geoRegions to be monitored by system . And get notified when user location enter that region. How to use them, see: https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/LocationAwarenessPG/Introduction/Introduction.html#//apple_ref/doc/uid/TP40009497-CH1-SW1

However, according to my tests on Simulator and discussion on forum (https://devforums.apple.com/message/251046#251046), the performance of the region features are poor. In Simulator, the - (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region method often get triggered 2km far away from the defined region, regardless the desired accuracy (cllocationManager.desiredAccuracy=kCLLocationAccuracyBest) and the radius of region ([CLCircularRegion alloc]initWithCenter:o.coordinate radius:o.radius identifier:name). 

The discussion on forum implies that the region features are based on cell and the accuracy could only be at kilometre level. I haven't test it on device. But currently, it seems not qualified to use for small region detection.

No comments:

Post a Comment