Error on startMonitoringForRegion: CLClientCopyMonitoredRegions

Originator:hector.ramos
Number:rdar://8351167 Date Originated:24-Aug-2010 09:25 PM
Status:Duplicate/8231624 Resolved:08-Sep-2010 11:13 AM
Product:iPhone SDK Product Version:4.1
Classification:Important Reproducible:
 
Summary:
Developing an application on an iPhone 4 device. When a CLLocationManager object is sent the startMonitoringForRegion: message, the following error is logged in the debug console:
ERROR,Time,304391101.951,Function,"Boolean CLClientCopyMonitoredRegions(__CLClient*, const __CFDictionary**)",Could not send successfully

Steps to Reproduce:
1. Allocate a CLLocationManager object, and set it's delegate.
2. Set filters as such:
locationManager.desiredAccuracy = kCLLocationAccuracyNearestTenMeters;

3. Set up a region to be monitored (annotation is a mapview object. Substitute for any coordinate lat/long)
	CLLocation *loc = [[CLLocation alloc] initWithLatitude:annotation.coordinate.latitude longitude:annotation.coordinate.longitude];
		CLRegion *region = [[CLRegion alloc] initCircularRegionWithCenter:loc.coordinate
																   radius:1000.0 
															   identifier:@"Some Identifier"];
		
		DLog(@"Will add region: %@ %f %f %f. Current monitored region count: %d", region.identifier, region.radius, region.center.latitude, region.center.longitude, [regionManager.monitoredRegions count]);

		[regionManager startMonitoringForRegion:region desiredAccuracy:kCLLocationAccuracyNearestTenMeters]; 

Expected Results:
Region to be monitored without problems.

Actual Results:
Error logged to console:
ERROR,Time,304391754.525,Function,"Boolean CLClientCopyMonitoredRegions(__CLClient*, const __CFDictionary**)",Could not send successfully

Regression:
Only tested on iPhone 4 device, running 4.0.2. Using 4.0.2 SDK on a Macbook, early 2009, running Snow Leopard.

25-Aug-2010 09:44 AM Hector Ramos:
Did some more testing and was able to isolate the possible cause of the problem.

It only seems to occur in my area in Puerto Rico. If I try to create a CLRegion within the continental USA, the method does not throw an error. If I go back and try to add a CLRegion within the island of Puerto Rico, I get the error again.

I guess the cellular tower data for this area is not cached locally, or something along those lines. The map in WWDC10's session on CL did include a few towers in my area so I'll test out other areas of the island.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!