Regions: region monitoring, significant location changes, background location service, location service authorization
Last Revision: | |
Build Requirements: | iOS 8.0 SDK or later |
Runtime Requirements: | iOS 8.0 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.
Copyright © 2016 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2016-02-11