Regions

Last Revision:
Version 1.1, 2011-03-23
Moved region re-adding logic into -viewDidAppear: due to timing issues.
(Full Revision History)
Build Requirements:
iOS 4.3 or later
Runtime Requirements:
iOS 4.0 or later. iPhone 4, iPad 2 Wifi + 3G or later.

This sample demonstrates proper use of region monitoring, significant location changes, and handling location events in the background on iOS. The sample uses an MKMapView that allows the user to add and remove regions to monitor, as well as a UITableView to display the region enter/exit/fail events that occur. When the application goes into the background, location updates are stopped and significant location changes are started. Likewise, when the application enters the foreground, location updates are started again and significant location changes are stopped. When location updates occur in the background, a badge is added to the homescreen icon displaying the number of region enter/exit/fail events logged.