Platforms to show: All Mac Windows Linux Cross-Platform

Back to CLLocationManagerMBS class.

CLLocationManagerMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreLocation MBS MacFrameworks Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
The constructor.
Example
dim c as new CLLocationManagerMBS

MsgBox str(c.Handle) // not zero on success

CLLocationManagerMBS.Destructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreLocation MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The destructor.

CLLocationManagerMBS.dismissHeadingCalibrationDisplay

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreLocation MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Dismisses the heading calibration view from the screen immediately.

Core Location uses the heading calibration alert to calibrate the available heading hardware as needed. The display of this view is automatic, assuming your delegate supports displaying the view at all. If the view is displayed, you can use this method to dismiss it after an appropriate amount of time to ensure that your application's user interface is not unduly disrupted.

CLLocationManagerMBS.monitoredRegions as CLRegionMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreLocation MBS MacFrameworks Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The array of shared regions monitored by all location manager objects.

You cannot add regions to this property directly. Instead, you must register regions by calling the startMonitoringForRegion method. The regions in this property are shared by all instances of the CLLocationManagerMBS class in your application.

The objects in this set may not necessarily be the same objects you specified at registration time. Only the region data itself is maintained by the system. Therefore, the only way to uniquely identify a registered region is using its identifier property.

The location manager persists region data between launches of your application. If your application is terminated and then relaunched, the contents of this property are repopulated with region objects that contain the previously registered data.

Available on Mac OS X 10.7 or later.

CLLocationManagerMBS.startMonitoringForRegion(region as CLRegionMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreLocation MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Starts monitoring the specified region.

region: The region object that defines the boundary to monitor. This parameter must not be nil.

You must call this method separately for each region you want to monitor. If an existing region with the same identifier is already being monitored by the application, the old region is replaced by the new one. The regions you add using this method are shared by all location manager objects in your application and stored in the monitoredRegions property.

Region events are delivered to the didEnterRegion and didExitRegion events. If there is an error, the location manager calls the monitoringDidFailForRegion event instead.

CLLocationManagerMBS.startMonitoringSignificantLocationChanges

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreLocation MBS MacFrameworks Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Starts the generation of updates based on significant location changes.
Example
dim c as new CLLocationManagerMBS

c.startMonitoringSignificantLocationChanges

This method initiates the delivery of location events asynchronously, returning shortly after you call it. Location events are delivered to your delegate's didUpdateToLocation event. The first event to be delivered is usually the most recently cached location event (if any) but may be a newer event in some circumstances. Obtaining a current location fix may take several additional seconds, so be sure to check the timestamps on the location events in your event code.

After returning a current location fix, the receiver generates update events only when a significant change in the user's location is detected. For example, it might generate a new event when the device becomes associated with a different cell tower. It does not rely on the value in the distanceFilter property to generate events. Calling this method several times in succession does not automatically result in new events being generated. Calling stopMonitoringSignificantLocationChanges in between, however, does cause a new initial event to be sent the next time you call this method.

In addition to your subclass implementing the didUpdateToLocation event, it should also implement the didFailWithError event to respond to potential errors.

Available in Mac OS X 10.7 or later.

CLLocationManagerMBS.startUpdatingHeading

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreLocation MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Starts the generation of updates that report the user's current heading.

This method returns immediately. Calling this method when the receiver is stopped causes it to obtain an initial heading and notify your delegate. After that, the receiver generates update events when the value in the headingFilter property is exceeded.

Before calling this method, you should always check the headingAvailable property to see whether heading information is supported on the current device. If heading information is not supported, calling this method has no effect and does not result in the delivery of events to your delegate.

Calling this method several times in succession does not automatically result in new events being generated. Calling stopUpdatingHeading in between, however, does cause a new initial event to be sent the next time you call this method.

If you start this service and your application is suspended, the system stops the delivery of events until your application starts running again (either in the foreground or background). If your application is terminated, the delivery of new heading events stops altogether and must be restarted by your code when the application is relaunched.

Heading events are delivered to the didUpdateHeading event. If there is an error, the location manager calls the
didFailWithError event instead.

CLLocationManagerMBS.startUpdatingLocation

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreLocation MBS MacFrameworks Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Starts the generation of updates that report the user's current location.
Example
dim c as new CLLocationManagerMBS

c.startUpdatingLocation

This method returns immediately. Calling this method when the receiver is stopped causes it to obtain an initial location fix (which may take several seconds) and notify your delegate. After that, the receiver generates update events primarily when the value in the distanceFilter property is exceeded. Updates may be delivered in other situations though. For example, the receiver may send another notification if the hardware gathers a more accurate location reading.

Calling this method several times in succession does not automatically result in new events being generated. Calling stopUpdatingLocation in between, however, does cause a new initial event to be sent the next time you call this method.

Some examples using this method:

CLLocationManagerMBS.stopMonitoringForRegion(region as CLRegionMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreLocation MBS MacFrameworks Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Stops monitoring the specified region.

region: The region object currently being monitored. This parameter must not be nil.

If the specified region object is not currently being monitored, this method has no effect.

Available on Mac OS X 10.7 or later.

CLLocationManagerMBS.stopMonitoringSignificantLocationChanges

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreLocation MBS MacFrameworks Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Stops the delivery of location events based on significant location changes.

Use this method to stop the delivery of location events that was started using the startMonitoringSignificantLocationChanges method.
Available on Mac OS X 10.7 or later.

CLLocationManagerMBS.stopUpdatingHeading

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreLocation MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Stops the generation of heading updates.

Call this method whenever your code no longer needs to receive heading-related events. Disabling event delivery gives the receiver the option of disabling the appropriate hardware (and thereby saving power) when no clients need location data. You can always restart the generation of heading updates by calling the startUpdatingHeading method again.

CLLocationManagerMBS.stopUpdatingLocation

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreLocation MBS MacFrameworks Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Stops the generation of location updates.
Example
dim c as new CLLocationManagerMBS

c.startUpdatingLocation
// later
c.stopUpdatingLocation

You should call this method whenever your code no longer needs to receive location-related events. Disabling event delivery gives the receiver the option of disabling the appropriate hardware (and thereby saving power) when no clients need location data. You can always restart the generation of location updates by calling the startUpdatingLocation method again.

Some examples using this method:

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


The biggest plugin in space...