iosobjective-cios7cllocationmanagerclregion

Monitoring Regions fails when stop and start MonitoringForRegion - iOS 7.1


My App should be able to Monitor different Regions. It should be also possible to "Edit" monitored Regions. I know thats only possible to start and stop Region-Monitoring. But that is my Problem. I've implement the following Workflow:

  1. Search monitored Regions in CLLocationManager.monitoredRegions using Identifier Property of CLCircularRegion

  2. Stop CLCircularRegion using CLLocationManager.stopMonitoringForRegion

  3. Start Monitoring new ("edited") CLCircularRegion using CLLocationManager.startMonitoringForRegion

  4. Check State with CLLocationManager.requestStateForRegion

But there is no new CLCircularRegion started.

CLLocationManager.monitoredRegions is 0.

It seems that stop and start MonitoringForRegion needs to have a delay between. Cause when i set a Breakpoint between Point 2. and 3. it works.

How can i fix that ?


Solution

  • You need to remove all monitored region and again to add region to monitor which you required.