regionMonitoringAvailable is deprecated in iOS 7. What are we supposed to use instead?
Asked
Active
Viewed 3,607 times
10
-
1Looks like `isMonitoringAvailableForClass:`. See [Determining the Availability of Region Monitoring](https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/LocationAwarenessPG/RegionMonitoring/RegionMonitoring.html#//apple_ref/doc/uid/TP40009497-CH9-SW3) in the Location and Maps Programming Guide. – Jan 19 '14 at 23:38
1 Answers
13
The header file for CLLocationManager
states that you should now use [CLLocationManager isMonitoringAvailableForClass:]
:
Determines whether the device supports monitoring for the specified type of region. If
NO
, all attempts to monitor the specified type of region will fail.
You pass in the class of CLRegion
you wish to monitor. For example:
[CLLocationManager isMonitoringAvailableForClass:[CLBeaconRegion class]];
Edit: As @anna mentions above, this is also discussed in the Location and Maps Programming Guide.
Apple usually post information about alternatives to deprecated methods, but unfortunately the documentation, headers, and other programming guides are sometimes out of sync with one another.

James Frost
- 6,960
- 1
- 33
- 42