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() {
|
override init() {
|
||||||
super.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 {
|
deinit {
|
||||||
@@ -250,4 +257,3 @@ extension TimeSyncManager: CBPeripheralDelegate {
|
|||||||
central.cancelPeripheralConnection(peripheral)
|
central.cancelPeripheralConnection(peripheral)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user