Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

CLLocationManagerMBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class CoreLocation MBS MacFrameworks Plugin 9.6 Yes No No Yes, macOS only No
Function: The CoreLocation base class.
Example:
dim c as new CLLocationManagerMBS

c.startUpdatingLocation
Notes:
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:
https://developer.apple.com/library/mac/#documentation/CoreLocation/Reference/CLLocationManager_Class/CLLocationManager/CLLocationManager.html

Feedback, Comments & Corrections

Authorization Status Constants.

Constant Value Description
kCLAuthorizationStatusAuthorized 3 This application is authorized to use location services.
kCLAuthorizationStatusDenied 2 The user explicitly denied the use of location services for this application or location services are currently disabled in Settings.
kCLAuthorizationStatusNotDetermined 0 The user has not yet made a choice regarding whether this application can use location services.
kCLAuthorizationStatusRestricted 1 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

Constant Value Description
kCLDeviceOrientationFaceDown 6 The device is held parallel to the ground with the screen facing downwards.
kCLDeviceOrientationFaceUp 5 The device is held parallel to the ground with the screen facing upwards.
kCLDeviceOrientationLandscapeLeft 3 The device is in landscape mode, with the device held upright and the home button on the right side.
kCLDeviceOrientationLandscapeRight 4 The device is in landscape mode, with the device held upright and the home button on the left side.
kCLDeviceOrientationPortrait 1 The device is in portrait mode, with the device held upright and the home button at the bottom.
kCLDeviceOrientationPortraitUpsideDown 2 The device is in portrait mode but upside down, with the device held upright and the home button at the top.
kCLDeviceOrientationUnknown 0 The orientation is currently not known.

Corelocation Error Codes

Constant Value Description
kCLErrorGeocodeCanceled 10 The geocode request was canceled.
kCLErrorGeocodeFoundNoResult 8 The geocode request yielded no result.
kCLErrorGeocodeFoundPartialResult 9 The geocode request yielded a partial result.
kCLErrorHeadingFailure 3 The heading could not be determined.
kCLErrorNetwork 2 The network was unavailable or a network error occurred.
kCLErrorRegionMonitoringDenied 4 Access to the region monitoring service was denied by the user.
kCLErrorRegionMonitoringFailure 5 A registered region cannot be monitored.
kCLErrorRegionMonitoringResponseDelayed 7 Core Location will deliver events but they may be delayed.
kCLErrorRegionMonitoringSetupDelayed 6 Core Location could not initialize the region monitoring feature immediately.

This class has no sub classes.

Some examples which use this class:


The items on this page are in the following plugins: MBS MacFrameworks Plugin.


CLLocationCoordinate2DMBS   -   CLLocationMBS




Links
MBS Xojo Plugins