clregion

didEnterRegion called with larger radius (iOS)

别说谁变了你拦得住时间么 提交于 2019-12-03 03:55:23
I want didEnterRegion to be called with much precision, but I wasn't able to do so. Here is what I have done: I used the best values of distanceFilter and desiredAccuracy (most precise GPS settings according to Apple) and have a destination CLCircularRegion (Subclass of CLRegion). self.locationManager.distanceFilter = kCLLocationAccuracyBestForNavigation; self.locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation; @property (nonatomic, strong) CLCircularRegion *Destination; self.Destination = [[CLCircularRegion alloc] initWithCenter:CLLocationCoordinate2DMake(43.907691, -69

Region monitoring current location doesn't notify on exit

坚强是说给别人听的谎言 提交于 2019-12-03 00:48:36
I'm trying to test region monitoring, for that I'm getting current location like this: - (void)startLocationTracking { CLLocationManager *locationManager = [[CLLocationManager alloc] init]; // Start location manager if ([CLLocationManager locationServicesEnabled] && [CLLocationManager authorizationStatus] == kCLAuthorizationStatusAuthorized) { locationManager = [LocationTracker sharedLocationManager]; locationManager.delegate = self; [locationManager startMonitoringSignificantLocationChanges]; } } And tracking first location with region monitoring like this: -(void)locationManager:

CoreLocation kCLErrorDomain error 5

蓝咒 提交于 2019-12-03 00:14:07
I subclassed a CLRegion to support Polygons via overriding containsCoordinate: to use ray casting logic instead of the original distance crunching logic. The subclass is initialized via the normal method ( initCircularRegionWithCenter:radius:identifier: ), then CLLocationCoordinate2d s are added as NSValue s to a mutable array. These coordinates are used during the ray casting logic. As soon as I try to use the CLRegion subclass, I am confronted with a ton of errors in my application logic, as well as the following error: 2013-07-18 16:46:44.515 Geofencing[4816:907] (identifier 6C11CBAF-3EE4

Geofencing iOS 6

↘锁芯ラ 提交于 2019-11-30 05:31:30
I am creating an app that tells the user whether they are near the destination. I am calculating the distance between the currentLocation and the destination. I'm doing the calculation inside the didUpdateLocations . It is working but I've seen that there are methods that can deal with that without the need of doing any math. I am registering the region in the CLLocationManager ; however it seems that the methods didExitRegion and didEnterRegion are not been called. Here are the part of the code where I register the region: - (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar { [self

Geofencing iOS 6

孤人 提交于 2019-11-29 04:15:03
问题 I am creating an app that tells the user whether they are near the destination. I am calculating the distance between the currentLocation and the destination. I'm doing the calculation inside the didUpdateLocations . It is working but I've seen that there are methods that can deal with that without the need of doing any math. I am registering the region in the CLLocationManager ; however it seems that the methods didExitRegion and didEnterRegion are not been called. Here are the part of the

didEnterRegion works in foreground but not background or other VCs

限于喜欢 提交于 2019-11-29 02:19:19
If the app is running and the CLLocationManagerDelegate class is the foreground (i.e. visible) then the didEnterRegions triggers and I get both the NSLog as well as the AlertView. However, I get nothing when the app is in the background or, essentially, if the screen is showing anything but the delegate class. I have set "App registers for location updates" under "Required background modes" in the plist although I'm not sure that's even necessary. Here's what I think is the relevant code although I may be wrong (and will gladly add more). I should note that everything in viewDidLoad is wrapped

How can I disable any CLRegion objects registered with -startMonitoringForRegion?

自作多情 提交于 2019-11-28 22:54:17
I am using a NavigationController to display a list of geo-fences available to the user. At the top there is a global on/off switch that I would like to use to disable any fences registered with CoreLocation -startMonitoringForRegion. My fences seem to be registering ok and working for the most part, but no matter how many times I disable the fences individually, I'm still getting the purple location arrow indicating that the system is still monitoring my location and/or fences. When I disable my fences individually, this is how I'm doing it. CLLocationCoordinate2D coord; coord.latitude = [

didEnterRegion works in foreground but not background or other VCs

余生颓废 提交于 2019-11-27 16:35:24
问题 If the app is running and the CLLocationManagerDelegate class is the foreground (i.e. visible) then the didEnterRegions triggers and I get both the NSLog as well as the AlertView. However, I get nothing when the app is in the background or, essentially, if the screen is showing anything but the delegate class. I have set "App registers for location updates" under "Required background modes" in the plist although I'm not sure that's even necessary. Here's what I think is the relevant code