Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.5   10.0   10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2    Statistic    FMM    Blog  

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 ✅ Yes, on macOS ✅ 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

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


CoreLocation.latitude - CoreLocation.longitude

Feedback: Report problem or ask question.