iOS: didDiscoverPeripheral not called in Background mode

后端 未结 4 2179
情歌与酒
情歌与酒 2020-12-10 08:39

I am Working on BLE project, everything works fine when the app in the foreground.It can discover and connect to the peripheral, all the call back method work perfectly.

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-10 08:53

    Paulw11 said are right, If your app find the peripherals in the foreground. It will not call the didDiscoverPeripheral for the same peripherals when it enters the background.

    For more information about the iOS BLE Behavior in the background mode. You can check this answer What exactly can CoreBluetooth applications do whilst in the background?

提交回复
热议问题