Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the maximum number of regions that can be monitored with startMonitoringForRegion:region desiredAccuracy:accuracy?

The documentation says there's a limit to the number of regions that can be monitored with-

(void)startMonitoringForRegion:(CLRegion *)region desiredAccuracy:(CLLocationAccuracy)accuracy

but I couldn't find what that limit is, does anybody know?

like image 215
Gruntcakes Avatar asked Jan 04 '12 21:01

Gruntcakes


1 Answers

I have explored this a few times, and Apple intentionally doesn't say. All regions for the device go into one giant pool of monitored regions. So any regions you add have to be shared with other applications. I think the most I've heard successfully monitored is 20. But it is not an exact science. The OS will purge out any old regions if some other app needs to add newer regions. And likewise, your app could push out regions for other apps too.

It would be nice to have some better defined documentation on this for sure. If you download the console app, and add a bunch of regions from your app and say Notifications, there is a display log that will show you region count that runs on a pretty frequent basis. Remove a region, and you can see the count drop. Might come in helpful if you want to test out how many regions you can safely add. Good luck.

like image 66
Bill Burgess Avatar answered Sep 28 '22 05:09

Bill Burgess