Deprecated CLLocationManager Methods
A method identified as deprecated has been superseded and may become unsupported in the future.
Deprecated in iOS 4.0
headingAvailable
A Boolean value indicating whether the location manager is able to generate heading-related events. (read-only) (Deprecated in iOS 4.0. Use the headingAvailable class method instead.)
Discussion
Heading data may not be available on all iOS-based devices. You should check the value of this property before asking the location manager to deliver heading-related events.
Availability
- Available in iOS 3.0 and later.
- Deprecated in iOS 4.0.
See Also
Declared In
CLLocationManager.hlocationServicesEnabled
A Boolean value indicating whether location services are enabled on the device. (read-only) (Deprecated in iOS 4.0. Use the locationServicesEnabled class method instead.)
Discussion
In iOS, the user can enable or disable location services using the controls in Settings > Location Services. In OS X, the user can enable or disable location services from the Security & Privacy system preference.
You should check this property before starting location updates to determine whether the user has location services enabled for the current device. If this property contains the value NO and you start location updates anyway, the Core Location framework prompts the user with a confirmation alert asking whether location services should be reenabled.
Special Considerations
In iOS, this property is declared as nonatomic. In OS X, it is declared as atomic.
Availability
- Available in iOS 2.0 and later.
- Deprecated in iOS 4.0.
See Also
Declared In
CLLocationManager.hDeprecated in iOS 6.0
purpose
An application-provided string that describes the reason for using location services. (Deprecated in iOS 6.0.)
Discussion
If this property is not nil and the system needs to ask for the user’s consent to use location services, it displays the provided string. You can use this string to explain why your application is using location services.
You must set the value of this property prior to starting any location services. Because the string is ultimately displayed to the user, you should always load it from a localized strings file.
Availability
- Available in iOS 3.2 and later.
- Deprecated in iOS 6.0.
Declared In
CLLocationManager.hregionMonitoringEnabled
Returns a Boolean value indicating whether region monitoring is currently enabled. (Deprecated in iOS 6.0. Use regionMonitoringAvailable and authorizationStatus instead.)
Return Value
YES if region monitoring is available and is currently enabled; NO if it is unavailable or not enabled.
Discussion
In iOS, the user can enable or disable location services (including region monitoring) using the controls in Settings > Location Services.
You should check the return value of this method before starting region monitoring updates to determine whether the user currently allows location services to be used at all. If this method returns NO and you start region monitoring updates anyway, the Core Location framework prompts the user to confirm asking whether location services should be reenabled.
This method does not check to see if region monitoring capabilities are actually supported by the device. Therefore, you should also check the return value of the regionMonitoringAvailable class method before attempting to start region monitoring services.
Availability
- Available in iOS 4.0 and later.
- Deprecated in iOS 6.0.
See Also
Declared In
CLLocationManager.hstartMonitoringForRegion:desiredAccuracy:
Starts monitoring the specified region for boundary crossings. (Deprecated in iOS 6.0. Use startMonitoringForRegion: instead.)
Parameters
- region
The region object that defines the boundary to monitor. This parameter must not be
nil.- accuracy
The distance past the border (measured in meters) at which to generate notifications. You can use this value to prevent the delivery of multiple notifications when the user is close to the border’s edge.
Discussion
You must call this method separately for each region you want to monitor. If an existing region with the same identifier is already being monitored by the application, the old region is replaced by the new one. The regions you add using this method are shared by all location manager objects in your application and stored in the monitoredRegions property.
If you begin monitoring a region and your application is subsequently terminated, the system automatically relaunches it into the background if the region boundary is crossed. In such a case, the options dictionary passed to the application:didFinishLaunchingWithOptions: method of your application delegate contains the key UIApplicationLaunchOptionsLocationKey to indicate that your application was launched because of a location-related event. In addition, creating a new location manager and assigning a delegate results in the delivery of the corresponding region messages. The newly created location manager’s location property also contains the current location even if location services are not enabled.
Region events are delivered to the locationManager:didEnterRegion: and locationManager:didExitRegion: methods of your delegate. If there is an error, the location manager calls the locationManager:monitoringDidFailForRegion:withError: method of your delegate instead.
Availability
- Available in iOS 4.0 and later.
- Deprecated in iOS 6.0.
Declared In
CLLocationManager.h© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-09-19)