0

I need a little help here,

I have about 2000 regions I want to monitor (entrance only) using CLLocationManager, I have a function that finds the 20 nearest regions to the user's current location but where should I call it?

If someone will be able to help me and maybe even give me a code example it'll be great!

Thanks you very much!

FS.O
  • 403
  • 6
  • 24

1 Answers1

0

You can create a region containing 19 other regions and, whenever the user leaves this container region, update the regions you monitor.

Apple suggests:

To work around this limit, consider registering only those regions in the user’s immediate vicinity. As the user’s location changes, you can remove regions that are now farther way and add regions coming up on the user’s path.

lluisgh
  • 325
  • 1
  • 6
  • I want to reFind the 20 nearest stores and to monitor them, but where should I do that? didUpdateLocations? Maybe you can give me a code example please? – FS.O Feb 01 '16 at 17:44