ios - CoreBluetooth Central Manager cannot discover peripheral in background -
i have application utilizing bluetooth 4.0 le. application allows device act central , peripheral.
i want application run in background. have included uibackgroundmodes "bluetooth-central" , "bluetooth-peripheral" in info.plist already.
i running application on 2 different devices bluetooth 4.0 le enabled.
when both devices running in foreground, works , information passed both ways.
when 1 device running in foreground , other running in background, device running in background able scan , advertise, unable discover other device running in background. device running in foreground able discover , connect device running in background.
after reading through apple's core bluetooth programming guide, know connecting device , sharing information both ways possible.
i can post more information upon request. thank you.
when peripheral app backgrounded, advertised services pushed "overflow area" , peripheral name not advertised @ all. additionally, advertisement interval raised. in theory, ios ble stack should handle case , request overflow area data not so. @ same time, scanning on backgrounded central slowed down, , additionally requires specific service uuids work. (you cannot scan in background nil
services)
as consequence, scanning backgrounded devices on backgrounded central not possible.
either bug or feature, apple knows. open radar , tell them issue. more of this, better chance response.
Comments
Post a Comment