LocationProvider
The LocationProvider
protocol defines a set of methods that a class must
implement in order to serve as the location events provider.
-
Configures the location provider.
-
Returns the current localization authorization status.
-
Returns the current accuracy authorization that the user has granted. The default value is
CLAccuracyAuthorization.fullAccuracy
on iOS versions prior to iOS 14. -
Returns the latest heading update received, or
nil
if none is available. -
Sets the delegate for
LocationProvider
. The implementation should hold a weak reference to the provided delegate to avoid creating a strong reference cycle withLocationManager
.Note
This method should only be called byLocationManager
. To allow other objects to participate in location updates, add aLocationConsumer
to theLocationManager
instead. -
Requests permission to use the location services whenever the app is running.
-
Requests permission to use the location services while the app is in the foreground.
-
Starts the generation of location updates that reports the device’s current location.
-
Stops the generation of location updates.
-
Specifies a physical device orientation.
-
Starts the generation of heading updates that reports the devices’s current heading.
-
Stops the generation of heading updates.
-
Dismisses immediately the heading calibration view from screen.