PWLocationManagerDelegate Protocol Reference

Conforms to NSObject
Declared in PWLocationManager.h

Overview

The PWLocationManagerDelegate protocol defines the methods used to receive location updates from a PWLocationManager object.

The methods of your delegate object are called from the main application thread.

– locationManager:didUpdateToLocation:

Tells the delegate that a new location update is available.

- (void)locationManager:(id<PWLocationManager>)manager didUpdateToLocation:(id<PWLocation>)location

Parameters

manager

The location manager object that generated the update event.

location

A location object with the updated location information. This object conforms to the PWLocation protocol.

Discussion

Implementation of this method is optional but recommended.

Declared In

PWLocationManager.h

– locationManager:failedWithError:

Tells the delegate that the location manager was unable to retrieve a location value.

- (void)locationManager:(id<PWLocationManager>)manager failedWithError:(NSError *)error

Parameters

manager

The location manager object that was unable to retrieve the location.

error

The error object containing the reason the location could not be retrieved.

Discussion

Implementation of this method is optional but recommended.

The location manager calls this method when it encounters an error trying to get the location data. If an error is encountered, the location manager will keep attempting to update until stopUpdatingLocation is called.

Declared In

PWLocationManager.h