AppleLocationProviderDelegate

public protocol AppleLocationProviderDelegate : AnyObject

The AppleLocationProviderDelegate protocol defines a set of optional methods that you can use to receive events from an associated location provider object.

  • Tells the delegate that an attempt to locate the user’s position failed.

    Declaration

    Swift

    func appleLocationProvider(_ locationProvider: AppleLocationProvider, didFailWithError error: Error)

    Parameters

    locationProvider

    The location provider that is tracking the user’s location.

    error

    An error object containing the reason why location tracking failed.

  • Tells the delegate that the accuracy authorization has changed.

    Declaration

    Swift

    func appleLocationProvider(_ locationProvider: AppleLocationProvider,
                               didChangeAccuracyAuthorization accuracyAuthorization: CLAccuracyAuthorization)

    Parameters

    locationProvider

    The location provider that is tracking the user’s location.

    accuracyAuthorization

    The updated accuracy authorization value.

  • Asks the delegate whether the heading calibration alert should be displayed.

    Declaration

    Swift

    func appleLocationProviderShouldDisplayHeadingCalibration(_ locationProvider: AppleLocationProvider) -> Bool

    Parameters

    locationProvider

    The location provider object coordinating the display of the heading calibration alert.

    Return Value

    true if you want to allow the heading calibration alert to be displayed; false if you do not.