iBeacon: didRangeBeacons stops getting called, must reset device for it to work again
We have received many reports at Radius Networks of phones stopping detecting iBeacons and requiring a reboot or turning Bluetooth off and back on again to resolve the situation. Folks have reported this on iPhone 4S, iPhone 5s, iPhone 5c and iPads.
I do not have any hard evidence that this is something that broke as of iOS 7.1, but the report frequency has gone way up since its release. The circumstantial evidence is therefore pretty strong.
When this phone gets into this state, the phone can still scan for bluetooth devices, and can still transmit as an iBeacon. It is therefore not a hardware problem with Bluetooth. Based on the available evidence, it is most likely a newly introduced bug in CoreLocation.
Bluetooth devices can't connect after ranging and monitoring for iBeacons until Bluetooth is reset
There is no more step to "close the Bluetooth activity", and anyway your device should be able to take other connections while monitoring for iBeacon
regions (I'm not sure for ranging cause it's more an 'active' task, but I bet it's the same thing)
I've seen a lot of strange behaviour related to iBeacon
in iOS7
, part of them are fixed in iOS8
, hopefully everything will be soon ok. I think you shouldn't worry about your code for the problem you describe, and wait for iOS8
iBeacon: didRangeBeacons not called
I have successfully built multiple frameworks that do beacon monitoring and ranging, so there is no reason this can't work. It's hard to say what's wrong without seeing the code but there are a few possibilities that always go along with getting detection working:
- Make sure your app has been granted location permission by the user.
- Make sure the CLLocationManager is constructed with a proper delegate, and that it is not being garbage collected.
- Use breakpoints or log lines to figure out what is going on along the way. Make sure
startRangingBeacons
inRegion
andstartMonitoringForRegion
are called with a correctCLBeaconRegion
definition.
(Kontakt.io) iBeacon didEnterRegion not fired
Firstly, verify you can detect your beacons with an off-the-shelf app like Locate for iBeacon available here: https://itunes.apple.com/us/app/locate-for-ibeacon/id738709014?mt=8. It will verify that the beacons are working properly and the UUIDs are configured to be what you expect.
Once you know for sure the beacons work with your device, then start troubleshooting your code.
EDIT: Also be sure to reboot your phone before testing to guard against a known iOS 7.1 bug;: https://stackoverflow.com/a/22949187/1461050
ibeacon on ios 7.1 - app stop listening to beacon after a while
You are experiencing a known iOS 7.1 bug that makes CoreLocation stop looking for iBeacons after awhile. See here: iBeacon: didRangeBeacons stops getting called, must reset device for it to work again
There is no known solution. You simply have to reboot your phone as a workaround until Apple releases iOS 7.2 with (hopefully) a fix.
To test background monitoring with the app not running, simply do a first detection with your app, reboot your phone, and wait up to 15 min while your iBeacon is transmitting.
Related Topics
Swift Editor Placeholder in Source File
Setting Direction for Uiswipegesturerecognizer
Custom Installed Font Not Displayed Correctly in Uilabel
How to Crop Uiimage on Oval Shape or Circle Shape
How to Route Audio to Speaker Without Using Audiosessionsetproperty
How to Change Color of Single Word in Uitextview and Uitextfield
How to Create a Category in Xcode 6 or Higher
How to Push and Present to Uiviewcontroller Programmatically Without Segue in iOS Swift 3
How to Post String with Special Character and Thai Language Using Xml Parsing in Objective C
Developing for iOS Device in Windows Environment with Flutter
Behaviour for Significant Change Location API When Terminated/Suspended
Using Iskindofclass with Swift
No Avplayer Delegate? How to Track When Song Finished Playing? Objective C iPhone Development