Skip to content

Instantly share code, notes, and snippets.

@iosdevie
Created May 26, 2021 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iosdevie/036a7a5583c04bf7440b18a7a42fe935 to your computer and use it in GitHub Desktop.
Save iosdevie/036a7a5583c04bf7440b18a7a42fe935 to your computer and use it in GitHub Desktop.
func centralManagerDidUpdateState(_ central: CBCentralManager) {
switch central.state {
case .unauthorized:
switch central.authorization {
case .allowedAlways:
case .denied:
case .restricted:
case .notDetermined:
}
case .unknown:
case .unsupported:
case .poweredOn:
self.centralManager?.scanForPeripherals(withServices: nil, options: [CBCentralManagerScanOptionAllowDuplicatesKey:true])
case .poweredOff:
case .resetting:
@unknown default:
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment