如何完全打开蓝牙力或如何在我的ios应用程序中请求打开蓝牙的权限

时间:2019-07-02 06:46:10

标签: ios swift core-bluetooth

func centralManagerDidUpdateState(central: CBCentralManager) {
    switch (central.state)
    {
    case .PoweredOff:
        print("off")
    case .PoweredOn:
        centralManager.scanForPeripheralsWithServices(nil, options: nil)
    case .Resetting:
        print("resetting")
    case .Unauthorized:
        print("unaithorized")
    case .Unsupported:
        print("unsupported")
    case .Unknown:
        print("unknown")
    }
}

此代码仅检查蓝牙的状态,无法打开,我想以任何方式打开蓝牙

0 个答案:

没有答案