Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth status (powered) #305

Open
CavalcanteLeo opened this issue Jul 27, 2022 · 4 comments
Open

Bluetooth status (powered) #305

CavalcanteLeo opened this issue Jul 27, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@CavalcanteLeo
Copy link

We can check the status o f the bluetooth if it's turned on or off

Should be great to check that too with PermissionsKit

var manager:CBCentralManager!

 viewDidLoad() {      // Or init()
     manager          = CBCentralManager()
     manager.delegate = self
 }

func centralManagerDidUpdateState(_ central: CBCentralManager) {
    switch central.state {
    case .poweredOn:
        break
    case .poweredOff:
        print("Bluetooth is Off.")
        break
    case .resetting:
        break
    case .unauthorized:
        break
    case .unsupported:
        break
    case .unknown:
        break
    default:
        break
    }
}
@CavalcanteLeo CavalcanteLeo added the enhancement New feature or request label Jul 27, 2022
@ivanvorobei
Copy link
Member

Hello!
So idea add property about power on and off, right?

@CavalcanteLeo
Copy link
Author

yep

@CavalcanteLeo
Copy link
Author

CavalcanteLeo commented Jul 28, 2022

I can submit a PR this weekend if it helps

@ivanvorobei
Copy link
Member

I can add it myself, thanks for idea. Soon release new version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants