ios - CoreBluetooth does not call didDisconnectPeripheral when flight mode toggles -


i have corebluetooth app. starts connection in foreground , starts sending/receiving data , continues doing when sent background since have added bluetooth-central uibackgroundmodes in app-info.plist.

if toggle flightmode setting app gets disconnected, wont diddisconnectperipheral callback. why this?

my workaround has been clear references cbperiperal object within centralmanagerdidupdatestate able new scan , connect when app brought foreground again.

same answer other question -> app don't discover services when reconnecting after power cycling bluetooth

you need call cancelconnection: on peripherals when centralmanager updates cbcentralmanagerstatepoweredoff


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -