mirror of
https://github.com/usatiuk/cardboy.git
synced 2025-10-28 15:17:48 +01:00
fix
This commit is contained in:
@@ -37,6 +37,13 @@ final class TimeSyncManager: NSObject, ObservableObject {
|
||||
|
||||
override init() {
|
||||
super.init()
|
||||
// Force the central manager to be created immediately so CoreBluetooth
|
||||
// can begin delivering state updates without waiting for a manual action.
|
||||
_ = central
|
||||
|
||||
if central.state == .poweredOn {
|
||||
startScanning()
|
||||
}
|
||||
}
|
||||
|
||||
deinit {
|
||||
@@ -250,4 +257,3 @@ extension TimeSyncManager: CBPeripheralDelegate {
|
||||
central.cancelPeripheralConnection(peripheral)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user