|Type||Topic||Plugin||Version||macOS||Windows||Linux||Console & Web||iOS|
|class||CoreLocation||MBS MacFrameworks Plugin||9.6||Yes||No||No||Yes, macOS only||No|
dim c as new CLLocationManagerMBS
The CLLocationManagerMBS class defines the interface for configuring the delivery of location- and heading-related events to your application. You use an instance of this class to establish the parameters that determine when location and heading events should be delivered. You can also a location manager object to retrieve the most recent location data.
To use a CLLocationManagerMBS object to deliver location events, create an instance, configure the desired accuracy and distance filter values, and call the startUpdatingLocation method. The location service returns an initial location as quickly as possible, returning cached information when available. After delivery of the initial event notification, the CLLocationManagerMBS object may deliver additional events if the minimum threshold distance (as specified by the distanceFilter property) is exceeded or a more accurate location value is determined.
Important: The user has the option of denying an application's access to the location service data. During its initial uses by an application, the Core Location framework prompts the user to confirm that using the location service is acceptable. If the user denies the request, the CLLocationManagerMBS object reports an appropriate error to its delegate during future requests.
See also documentation from Apple for the CLLocationManager class:
- 10 events
- event didChangeAuthorizationStatus(status as Integer)
- event didEnterRegion(region as CLRegionMBS)
- event didExitRegion(region as CLRegionMBS)
- event didFailWithError(error as NSErrorMBS)
- event didFinishDeferredUpdatesWithError(error as NSErrorMBS)
- event didStartMonitoringForRegion(region as CLRegionMBS)
- event didUpdate(newLocation as CLLocationMBS, oldLocation as CLLocationMBS)
- event didUpdateHeading(newHeading as CLHeadingMBS)
- event didUpdateLocations(locations() as CLLocationMBS)
- event monitoringDidFailForRegion(region as CLRegionMBS, error as NSErrorMBS)
- 6 properties
- 12 methods
- method Constructor
- method Destructor
- method dismissHeadingCalibrationDisplay
- method monitoredRegions as CLRegionMBS()
- method startMonitoringForRegion(region as CLRegionMBS)
- method startMonitoringSignificantLocationChanges
- method startUpdatingHeading
- method startUpdatingLocation
- method stopMonitoringForRegion(region as CLRegionMBS)
- method stopMonitoringSignificantLocationChanges
- method stopUpdatingHeading
- method stopUpdatingLocation
- 11 shared methods
- shared method authorizationStatus as Integer
- shared method CheckEvents
- shared method deferredLocationUpdatesAvailable as boolean
- shared method headingAvailable as boolean
- shared method kCLErrorDomain as string
- shared method kCLErrorUserInfoAlternateRegionKey as string
- shared method locationServicesAvailable as boolean
- shared method locationServicesEnabled as boolean
- shared method regionMonitoringAvailable as boolean
- shared method regionMonitoringEnabled as boolean
- shared method significantLocationChangeMonitoringAvailable as boolean
- 22 constants
Authorization Status Constants.
This application is authorized to use location services.
The user explicitly denied the use of location services for this application or location services are currently disabled in Settings.
The user has not yet made a choice regarding whether this application can use location services.
This application is not authorized to use location services. The user cannot change this application's status, possibly due to active restrictions such as parental controls being in place.
Device Orientation Constants
The device is held parallel to the ground with the screen facing downwards.
The device is held parallel to the ground with the screen facing upwards.
The device is in landscape mode, with the device held upright and the home button on the right side.
The device is in landscape mode, with the device held upright and the home button on the left side.
The device is in portrait mode, with the device held upright and the home button at the bottom.
The device is in portrait mode but upside down, with the device held upright and the home button at the top.
The orientation is currently not known.
Corelocation Error Codes
The geocode request was canceled.
The geocode request yielded no result.
The geocode request yielded a partial result.
The heading could not be determined.
The network was unavailable or a network error occurred.
Access to the region monitoring service was denied by the user.
A registered region cannot be monitored.
Core Location will deliver events but they may be delayed.
Core Location could not initialize the region monitoring feature immediately.
This class has no sub classes.
Some examples which use this class:
- /MacFrameworks/CoreLocation/CoreLocation to find computer location
- /MacFrameworks/CoreLocation/Locate Address Web
The items on this page are in the following plugins: MBS MacFrameworks Plugin.
MBS Xojo Plugins