LocationProviderDelegate

public protocol LocationProviderDelegate : AnyObject

The LocationProviderDelegate protocol defines a set of methods that respond to location updates from an LocationProvider.

  • Notifies the delegate with the new location data.

    Declaration

    Swift

    func locationProvider(_ provider: LocationProvider, didUpdateLocations locations: [CLLocation])

    Parameters

    provider

    The location provider reporting the update.

    locations

    An array of CLLocation objects in chronological order, with the last object representing the most recent location.

  • Notifies the delegate with the new heading data.

    Declaration

    Swift

    func locationProvider(_ provider: LocationProvider, didUpdateHeading newHeading: CLHeading)

    Parameters

    provider

    The location provider reporting the update.

    newHeading

    The new heading update.

  • Notifies the delegate that the location provider was unable to retrieve location updates.

    Declaration

    Swift

    func locationProvider(_ provider: LocationProvider, didFailWithError error: Error)

    Parameters

    provider

    The location provider reporting the error.

    error

    An error object containing the error code that indicates why the location provider failed.

  • Notifies the delegate that the location provider changed accuracy authorization

    Declaration

    Swift

    func locationProviderDidChangeAuthorization(_ provider: LocationProvider)

    Parameters

    provider

    The location provider reporting the error.

    manager

    The location manager that is reporting the change