CBPeripheralManagerState始终显示state = off

时间:2013-10-21 20:49:07

标签: objective-c xcode bluetooth

所以我有这个peripheralManager。我想检查,如果它的状态是否开启:

  if (peripheralManager.state <  CBPeripheralManagerStatePoweredOn) {
        UIAlertView *errorAlert = [[UIAlertView alloc] initWithTitle:@"Bluetooth must be enabled" message:@"To search for pics, you have to enable bluetooth." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
        [errorAlert show];

    }

我正在iPhone 5上进行测试,蓝牙显然已经开启了。但它始终显示它已关闭。

更新 我该如何解决?

0 个答案:

没有答案