iBeacon APIs stop working randomly on 7.1 devices

Originator:deadfalkon
Number:rdar://16644458 Date Originated:2014-04-17
Status:closed Resolved:
Product:iOS Product Version:7.1
Classification: Reproducible:
 
I´m building an SDK that relies heavily on the iBeacon ranging and monitoring. Several customer are using our SDK already but they are reporting weird behavior, which I´m now sure is a bug in iOS 7.1

I was able to get my hands on three devices which experienced the bug. Rebooting 2 fixed the undesired behaviour. One device had a broken on/of button, so rebooting was not an option. I was able to connect that device to XCode and install Apple´s sample application AirLocate with some additional proximity UUIDs added (8 in total). I had it running with breakpoints and came to the following conclusions.

One customer reported getting the the kCLErrorDomain error 5 (monitored too many regions) but the app he was using was only monitoring 9 regions. Restarting the device fixed the error.

We´ve also been in non-technical call with some Apple employees from Munich, one of them reported this behaviour as well. Rebooting fixed his phone as well.

**Steps to reproduce**
Don´t reboot the device for some days. iBeacon based apps stop working.

All other BTLE related APIs seem to work fine. I was able to connect to a TI Sensortag  and scan for peripherals..

Reboot the device and iBeacon ranging and monitoring start working again.

You can use the AirLocate <https://developer.apple.com/library/ios/samplecode/AirLocate/Introduction/Intro.html> sample API and some iBeacons to reproduce the behviour if a device is affected.

**Expected Results**
iBeacon ranging and monitoring callbacks should trigger callbacks. CLLocationManager does not call either of the two callbacks:

	- (void)locationManager:(CLLocationManager *)manager didRangeBeacons:(NSArray *)beacons inRegion:(CLBeaconRegion *)region
	
	- (void)locationManager:(CLLocationManager *)manager rangingBeaconsDidFailForRegion:(CLBeaconRegion *)region withError:(NSError *)error
	
neither does the Region Monitoring call any of the callbacks:

	- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region
	
	- (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region
	
	- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error

**Actual Results**

No callbacks at all.

**Configuration**
direct contact with customers experiencing the problem who had the following devices:

* iPhone5
* iPad3
* iPhone5s

**Version/Build**
Only seen with devices running iOS 7.1

**Additional Notes**
I´ve yet been able to reproduce the problem sucessfully.

Other resources online from people experiencing the bug:

* <http://stackoverflow.com/questions/20164952/cllocationmanager-kclerrordomain-codes>
* <http://stackoverflow.com/questions/20905843/locationmanagerrangingbeaconsdidfailforregionwitherror-kclerrordomain-16>
* <http://stackoverflow.com/questions/23029197/monitoringdidfailforregion-when-regioning-for-ibeacon-kclerrordomain-error-5>

Comments

we were seeing this exact bug heavily with iOS7.1 (occasionally with iOS7.0).

Since iOS7.1.2 was released we have not seen this again!

By abednarz42 at July 10, 2014, 2:21 a.m. (reply...)

Duplicate of 15693657 (Open)

Apple Developer Relations 22-Apr-2014 01:45 AM

Engineering has determined that your bug report is a duplicate of another issue and will be closed.

The open or closed status of the original bug report your issue was duplicated to appears in the yellow "Duplicate of XXXXXXXX" section of the bug reporter user interface. This section appears near the top of the right column's bug detail view just under the bug number, title, state, product and rank.

If you have any questions or concerns, please update your report directly here: http://bugreport.apple.com/.

By deadfalkon at April 22, 2014, 6:22 a.m. (reply...)

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!