Ranging of iBeacons might fail if beacon is emitted on same device

Number:rdar://17003408 Date Originated:22-May-2014 05:49 PM
Status:Open Resolved:
Product:iOS SDK Product Version:7.1.1 (11D201)
Classification:Serious Bug Reproducible:Sometimes
If you have an app emit an iBeacon as well as ranging might fail with CLError code 16.

Steps to Reproduce:
- Emit a beacon in an app via CBPeripheral
- Range it via CLLocationManager

Expected Results:
- locationManager:didRangeBeacons:inRegion: should show this beacon

Actual Results:
- sometimes it works
- sometimes you get locationManager:rangingBeaconsDidFailForRegion:withError: with code 16 “unavailable”.

I had this happen just now on an iPad Air and iPhone 5S, both running iOS 7.1.1. When I rebooted both the error no longer occurred.

In my testing I used separate apps on same device. i.e. start emitter app, then launch ranging app via Xcode. I am aware that beacon emitting is paused with the emitter app in background after a few seconds. Still ranging should not fail but return an empty array.

Supposedly earlier rdar://16761196 and rdar://15693657 describe the same issue.


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!