Services can be read from a connected Central
open class CBCentralManager : CBManager{
open func retrievePeripherals(withIdentifiers identifiers: [UUID]) -> [CBPeripheral]
}
open class CBCentralManager : CBManager{
open func retrieveConnectedPeripherals(withServices serviceUUIDs: [CBUUID]) -> [CBPeripheral]
}
Uses Bluetooth LE accessories Tick this option if you want to use bluetooth in background mode as a central
Acts as a Bluetooth LE accessory Tick this option if you want to use bluetooth in background mode as a Peripheral
Central operations can continue when your app is not running
// Initialiae CBManager with RestoreIdentifier
let CBCentralManagerOptionRestoreIdentifierKey: String
Discussion
/*A string (an instance of NSString) containing a unique identifier (UID) for the central manager that is being instantiated.
The system uses this UID to identify a specific central manager. As a result, the UID must remain the same for subsequent executions of the app in order for the central manager to be successfully restored.
@seealso
CBCentralManagerRestoredStatePeripheralsKey;
CBCentralManagerRestoredStateScanServicesKey;
CBCentralManagerRestoredStateScanOptionsKey;
*/
optional func centralManager(_ central: CBCentralManager, willRestoreState dict: [String : Any])
Now it also works even when device reboot
Even if thre are Bluetooth system level events that previously would have stopped these things from occuring on your behalf, we'll keep doing them for you.
In order to keep the power profile of these features low, we actually do have to do a lot of things in Hardware. So we are limited to number of things we can look for at a time, especially the number of services we can scan for. So the less things you ask for, the better the chances that we can keep your actions running all the time.
There's no UI to control what applications are allowed to do what in the background, so we will be stopped if