LocationProvider
public protocol 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.
Declaration
Swift
var locationProviderOptions: LocationOptions { get set }
-
Returns the current localization authorization status.
Declaration
Swift
var authorizationStatus: CLAuthorizationStatus { get }
-
Returns the current accuracy authorization that the user has granted
Declaration
Swift
var accuracyAuthorization: CLAccuracyAuthorization { get }
-
Returns the latest heading update received, or nil if none is available.
Declaration
Swift
var heading: CLHeading? { get }
-
Sets the delegate for
LocationProvider
Note
Calling this will override the delegate inAppleLocationProvider
and is highly discouraged Instead implement a LocationConsumerDeclaration
Swift
func setDelegate(_ delegate: LocationProviderDelegate)
-
Requests permission to use the location services whenever the app is running.
Declaration
Swift
func requestAlwaysAuthorization()
-
Requests permission to use the location services while the app is in the foreground.
Declaration
Swift
func requestWhenInUseAuthorization()
-
Requests temporary permission for precise accuracy
Declaration
Swift
@available(iOS 14.0, *) func requestTemporaryFullAccuracyAuthorization(withPurposeKey purposeKey: String)
-
Starts the generation of location updates that reports the device’s current location.
Declaration
Swift
func startUpdatingLocation()
-
Stops the generation of location updates.
Declaration
Swift
func stopUpdatingLocation()
-
Specifies a physical device orientation.
Declaration
Swift
var headingOrientation: CLDeviceOrientation { get set }
-
Starts the generation of heading updates that reports the devices’s current heading.
Declaration
Swift
func startUpdatingHeading()
-
Stops the generation of heading updates.
Declaration
Swift
func stopUpdatingHeading()
-
Dismisses immediately the heading calibration view from screen.
Declaration
Swift
func dismissHeadingCalibrationDisplay()