I'm developing a iOS application of using CoreBluetooth and i have one problem in application BackGround.
Generally, iOS application can't run long-term in Background. (e.g. pushing HomeButton. switching other application) But my application is set "Uses Bluetooth LE accessories" as BackGroundMode, so i can monitor region in Background.
And i implemented startRangingBeaconsInRegion in didEnterRegion.
When enter a region, Ranging region will be started and will be stopped after about 10 sec by iOS.
But i want to always use ranging in Background. Because my app use only one UUID for detecting over 20 beacons(20 means limit of startMonitoringForRegion), and i want to know how beacons there are in one region.
(About The reason of using only one UUID, please see this tips.
iBeacon / Bluetooth Low Energy (BLE devices) - maximum number of beacons.)
So I'm thinking the way of rebooting CoreBluetooth manager instance at fixed interval in background. if i can do alternately didEnterRegion -> didRangeBeacons-> reboot -> didEnterRegion -> didRangeBeacons -> reboot -> ..., i can check how beacon there are in the region at fixed interval.
Maybe i need background fetch... i'll try it later.
If you know about this way is available or not, please tell me that.
Or if you have any suggestions, please tell me, i'll try it.
Updated 2014/03/07 17:45
BackGround fetch will fire at UNSTABLE interval. So This way isn't the solution...