I am trying to develop an IOS application to detect Eddystone as well as iBeacons. I have used both Corelocation and Corebluetooth for implementation. I want to detect beacons in background and hence set up background mode as well. I observe that after a minutes in background, the frequency of the scan reduces to a great extent (once in 5 minutes). Is there a way to set the background scan frequency for IOS applications? 5 minutes seems to be a long time for the use case of the application I am developing. Also, is there any way to wake up the app if another beacon is within range?
1 Answers
Scanning BLE devices on iOS using CoreBluetooth in the background can be relatively slow as you suggest. Your 5 minute detection times are not unusual. By itself, CoreBluetooth doesn't give you any ability to increase this frequency. CoreLocation, however is much more optimized for detection speed, but it is limited to the iBeacon format.
One thing you can do is combine beacons that send out an iBeacon frame (for speed) with beacons that send out an Eddystone frame (for other purposes). If you start ranging for beacons when you get an iBeacon monitoring background event, you will find that your Eddystone detection times speed up as well. This trick allows you to kickstart CoreBluetooth scanning with CoreLocation ranging -- under the hood they are really the same.

- 63,876
- 14
- 121
- 204
-
My main purpose is to detect a new Eddystone address as quickly as possible in background. So if I go from one room to another such that I don't need to wait for 5 minutes for a new address to be detected. If I make some emitting device emit both iBeacon and Eddystone and use CoreLocation to detect a change, I would be able to scan for Eddystone at the same time you mean? If you have tried this before, how quickly will the app able to detect change in Eddystone address in terms of time? Thanks – Parth Parekh Aug 17 '16 at 18:55
-
I have not measured how fast it is, but I would suspect it would be similar to foreground scanning with CoreBluetooth. – davidgyoung Aug 17 '16 at 18:58
-
@davidgyoung, Can you please tell how do I combine iBeacon & Eddystone So that I can get url from eddystone when application is in background mode – swapnali patil Sep 08 '16 at 09:50
-
This is worthy of a new question. The basic idea is to set up CoreLocation beacon monitoring in the AppDelegate. If you open a new question showing your Eddystone detection code I can help. – davidgyoung Sep 08 '16 at 13:17