LocationPermissionsDelegate

@objc
public protocol LocationPermissionsDelegate

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

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

    Declaration

    Swift

    @objc
    optional func locationManager(_ locationManager: LocationManager, didFailToLocateUserWithError error: Error)

    Parameters

    locationManager

    The location manager 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

    @objc
    optional func locationManager(_ locationManager: LocationManager,
                                  didChangeAccuracyAuthorization accuracyAuthorization: CLAccuracyAuthorization)

    Parameters

    locationManager

    The location manager 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

    @objc
    optional func locationManagerShouldDisplayHeadingCalibration(_ locationManager: LocationManager) -> Bool

    Parameters

    locationManager

    The location manager 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.