Monitoring Changes

When the device either enters or exits a monitored region, the location manager will inform its delegate of the event by calling either the locationManager:didEnterRegion: or the locationManager:didExitRegion: method.

In locationManager:didEnterRegion:, the method first gets the identifier associated with the monitored region. This identifier was assigned when telling the location manager to monitor the region, and is the Core Data URI of the saved favorite place. This URI is used to get the managed object ID, which is used to retrieve the favorite place from the managed object context.

NSString *placeIdentifier = [region identifier];NSURL *placeIDURL = [NSURL URLWithString:placeIdentifier];NSManagedObjectID ...

Get iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.