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
providerThe location provider reporting the update.
locationsAn array of
CLLocationobjects 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
providerThe location provider reporting the update.
newHeadingThe 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
providerThe location provider reporting the error.
errorAn 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
providerThe location provider reporting the error.
managerThe location manager that is reporting the change
LocationProviderDelegate Protocol Reference