I want to create an application that performs a specific action when a user enters a specific area.
Since the regions that I want to control are on the server side (about 50,000 locations), and the number of regions is too large to register for monitoring right away, I want to start monitoring for regions that are close to the user's current location.
To do this, Iām thinking of using startMonitoringSignificantLocationChanges
to check if the user has changed the location, and then use locationManager:didUpdateToLocation:fromLocation:
register new regions to monitor and unregister regions that are now too far away.
My questions:
- Let me call the web service in
didUpdateToLocationwhile the app is in the background? - Is this the best way to implement such functionality, or do you know the best way?
Thank.
source
share