5

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.

McDJ
  • 767
  • 2
  • 11
  • 28
  • check out my solution http://stackoverflow.com/questions/22297995/add-more-than-20-regions-to-geofencing-ios/24080059#24080059 – uofc Jun 06 '14 at 12:59

1 Answers1

0

What you want is a space-filling-curve for example a z-curve of a hilbert-curve. It reduce the 2D problem to a 1D problem but it's most likely not answering your question.

Micromega
  • 12,486
  • 7
  • 35
  • 72