Instance Property

locationServicesEnabled

A Boolean value indicating whether location services are enabled on the device.

Declaration

@property(readonly, nonatomic) BOOL locationServicesEnabled;

Discussion

In iOS, the user can enable or disable location services using the controls in Settings > Location Services. In macOS, the user can enable or disable location services from the Security & Privacy system preference.

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 macOS, it is declared as atomic.

See Also

Deprecated

headingAvailable

A Boolean value indicating whether the location manager is able to generate heading-related events.

Deprecated
purpose

An app-provided string that describes the reason for using location services.

+ regionMonitoringAvailable

Returns a Boolean value indicating whether region monitoring is supported on the current device.

Deprecated
+ regionMonitoringEnabled

Returns a Boolean value indicating whether region monitoring is currently enabled.

Deprecated
- startMonitoringForRegion:desiredAccuracy:

Starts monitoring the specified region for boundary crossings.

Deprecated