CLLocationManagerDelegate
The methods you use to receive events from an associated location-manager object.
Declaration
protocol CLLocationManagerDelegate : NSObjectProtocolOverview
The location manager calls its delegate’s methods to report location-related events to your app. Implement this protocol in an app-specific object and use the methods to update your app. For example, you might use the current location to update the user’s position on a map or you might return search results relevant only to the user’s current location.
Assign your delegate object to the delegate property of the CLLocationManager object before starting any services. Core Location may report a cached value to your delegate immediately after you start the service, followed by a more current value later. Check the time stamp of any data objects you receive before using them.
Core Location calls the methods of your delegate object on the runloop from the thread on which you initialized CLLocationManager. That thread must itself have an active run loop, like the one found in your app’s main thread.
Topics
Responding to authorization changes
Handling errors
Receiving location updates
locationManager(_:didUpdateLocations:)locationManager(_:didUpdateTo:from:)locationManager(_:didFinishDeferredUpdatesWithError:)
Pausing location updates
Receiving visit updates
Receiving heading updates
Receiving region-related updates
locationManager(_:didEnterRegion:)locationManager(_:didExitRegion:)locationManager(_:didDetermineState:for:)locationManager(_:monitoringDidFailFor:withError:)locationManager(_:didStartMonitoringFor:)CLRegionState