0

I connect BLE to app locally(without system app) using CBCentralManager func

connect(_ peripheral: CBPeripheral, options: [String : Any]? = nil)

When my app will finished then device will be disconnected. Is it possible to save connection with device when app will closed? It needs for receiving notification from Apple Notification Centre Service.

Dmitry
  • 2,963
  • 2
  • 21
  • 39
  • 1
    You can maintain BLE connections in the background; this is covered in the Core Bluetooth Programming Guide from Apple, but I am a little confused by your mention of ANCS; ANCS is a connection between a device and iOS. Your app assist with the setup of the device but it doesn't need to maintain a connection once ANCS is delivering events to your device. – Paulw11 Dec 12 '16 at 23:36
  • What about using `applicationDidEnterBackground` of `UIApplicationDelegate`? – Ryan Dec 12 '16 at 23:36

0 Answers0