Permission
Permission copied to clipboard
Bluetooth permission on IOS<13
I have an issue with IOS pre 13, the callback for permission.request isn't being called. is there a way to callback with authorized automatically?
I don't think callback works for Bluetooth permission authorization change. I suggest you check the authorization status in viewDidLoad for your action or use UIApplication.didBecomeActiveNotification key with NotificationCenter. Or this might answer your question: Replace code in Bluetooth.swift if #available(iOS 13.0, *) { switch CBCentralManager().authorization { case .restricted: return .disabled case .denied: return .denied case .notDetermined, .allowedAlways: break @unknown default: return .notDetermined } } else { switch CBPeripheralManager.authorizationStatus() { case .restricted: return .disabled case .denied: return .denied case .notDetermined, .authorized: break @unknown default: return .notDetermined } }