Questions tagged [clregion]

CLRegion is an iOS class for CoreLocation framework that holds the information used in shape based regions.

The CLRegion class defines a geographical area that can be tracked. When an instance of this class is registered with a CLLocationManager object, the location manager generates an appropriate event whenever the user crosses the boundaries of the defined area.

97 questions
24
votes
3 answers

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

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…
Bill Burgess
  • 14,054
  • 6
  • 49
  • 86
18
votes
1 answer

How do you use CLRegion in iOS 7 since initCircularRegionWithCenter:radius:identifier: is deprecated?

Since the depreciation of initCircularRegionWithCenter:radius:identifier:, how would you define the region to be monitored using CLLocationManager?
Luthelis
  • 264
  • 2
  • 9
13
votes
2 answers

Region monitoring current location doesn't notify on exit

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…
Idan Moshe
  • 1,675
  • 4
  • 28
  • 65
12
votes
1 answer

On which iOS devices exactly is region monitoring supported?

From what I can interpret from the runtime requirements of sample region monitoring code of Apple, region monitoring is available on iPhone 4, iPad 2 Wifi + 3G or later. So I'm assuming that it's not available on iPad1 with 3G, or iPhone 3G/3GS. Is…
aslı
  • 8,740
  • 10
  • 59
  • 80
10
votes
1 answer

iOS Geofence, how to handle when inside region when monitoring starts?

I have been unable to work out how to handle a scenario where the phone is already inside a region when startMonitoringForRegion is called? Other questions have suggested calling requestStateForRegion inside didStartMonitoringForRegion this then…
Joe Maher
  • 5,354
  • 5
  • 28
  • 44
10
votes
1 answer

What to use instead of regionMonitoringAvailable which is deprecated in iOS 7?

regionMonitoringAvailable is deprecated in iOS 7. What are we supposed to use instead?
RawMean
  • 8,374
  • 6
  • 55
  • 82
9
votes
1 answer

Deprecated CLRegion methods - how to get radius?

I'm using the geocodeAddressString:completionHandler: method, which returns an array of CLPlacemarks. I have to get latitude, longitude, mnemonical name and radius. While getting the first 3 is easy: double lat =…
Nat
  • 12,032
  • 9
  • 56
  • 103
9
votes
7 answers

CoreLocation kCLErrorDomain error 5

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…
Nate Symer
  • 2,185
  • 1
  • 20
  • 27
9
votes
4 answers

didEnterRegion works in foreground but not background or other VCs

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,…
ari gold
  • 2,074
  • 3
  • 25
  • 51
8
votes
1 answer

Location Manager stopMonitoringForRegion Not Working

An app I'm working on currently sets up region monitoring with the user's current location when the app is backgrounded. When the app becomes active again I am trying to stop monitoring for the region, but it seems to work intermittently with the…
Mike
  • 9,765
  • 5
  • 34
  • 59
6
votes
2 answers

Can you stop regions from persisting between launches with CLLocationManager?

Is there a way to prevent CLLocationManager from persisting monitored regions between launches? Every time the app is launched I need to add a new set of monitored regions and the old ones are no longer useful. Is there a way to either prevent them…
charleyh
  • 2,033
  • 2
  • 20
  • 32
6
votes
1 answer

iOS 7 didEnterRegion not getting called at all

I am using the following code to monitor for regions in my iOS app. It works perfectly when I build the app on iOS6. When I build it on iOS7, the didEnterRegion is not triggered. // create and register a region with iOS CLLocationCoordinate2D…
6
votes
1 answer

why the didEnterRegion called twice?

I am using location services i.e. region monitoring in my iOS app, This is my code //this for creating region -(void)createRegion { [dictionary setValue:@"23 St, New York" forKey:@"title"]; [dictionary setValue:[NSNumber…
prabhu
  • 684
  • 11
  • 27
5
votes
1 answer

How does geofences behave when there are overlapping CLRegions

I can't seem to find any information on how Core Location handles overlapping geofences. In my particular case I was wondering if a smaller geofence would be registered over a bigger, overlapping region. Does someone know this?
Oscar Apeland
  • 6,422
  • 7
  • 44
  • 92
5
votes
1 answer

Geofencing iOS 6

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…
Camus
  • 827
  • 2
  • 20
  • 36
1
2 3 4 5 6 7