所以我有这个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上进行测试,蓝牙显然已经开启了。但它始终显示它已关闭。
更新 我该如何解决?