I want to create an app which does a specific action when the user enters a certain area.
Since the regions I want to monitor reside server-side (approx. 50.000 locations) and the number of regions is far too large to be registered for monitoring all at once, I want to start monitoring for regions which are close to the current location of the user.
To accomplish this I am thinking about using startMonitoringSignificantLocationChanges
to monitor whether the user has changed location and then use locationManager:didUpdateToLocation:fromLocation:
to register new regions to monitor and unregister regions which are now too far away.
My questions:
- Am I allowed do a call to a
web-service in
didUpdateToLocation
while the app is in the background? - Is this the best way to implement this kind of functionality or do you know of a better way?
Thanks.