Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

CoreLocation.locationServicesEnabled

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

Component Version macOS Windows Linux Server iOS SDK
CoreLocation 2.7 ✅ Yes ❌ No ❌ No ❌ No ✅ Yes
MBS( "CoreLocation.locationServicesEnabled" )

Parameters

none

Result

Returns 1 if location services are enabled or 0 if they are not.

Description

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

The user can enable or disable location services altogether from the Settings application by toggling the switch in Settings > General > Location Services.

You should check the return value of this method before starting location updates to determine if the user has location services enabled for the current device. If this method returns 0 and you start location updates anyway, the Core Location framework prompts the user with a confirmation panel asking whether location services should be reenabled.

Example Databases

This function checks for a license.

Created 18th August 2014, last changed 18th August 2014


CoreLocation.latitude - CoreLocation.longitude