As part of iOS 13’s, apps now need to request permission if they want to access Bluetooth.

How to check if user has accepted Bluetooth permission?
Try this:
var isBluetoothPermissionGranted: Bool {
if #available(iOS 13.1, *) {
return CBCentralManager.authorization == .allowedAlways
} else if #available(iOS 13.0, *) {
return CBCentralManager().authorization == .allowedAlways
}
// Before iOS 13, Bluetooth permissions are not required
return true
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With