2
我正在試用iPhone上的iOS藍牙中央管理器。iOS藍牙中央管理器
- (void)centralManagerDidUpdateState:(CBCentralManager *)central
{
// Determine the state of the peripheral
if ([central state] == CBCentralManagerStatePoweredOff) {
NSLog(@"CoreBluetooth BLE hardware is powered off");
}
else if ([central state] == CBCentralManagerStatePoweredOn) {
NSLog(@"CoreBluetooth BLE hardware is powered on and ready");
}
else if ([central state] == CBCentralManagerStateUnauthorized) {
NSLog(@"CoreBluetooth BLE state is unauthorized");
}
else if ([central state] == CBCentralManagerStateUnknown) {
NSLog(@"CoreBluetooth BLE state is unknown");
}
else if ([central state] == CBCentralManagerStateUnsupported) {
NSLog(@"CoreBluetooth BLE hardware is unsupported on this platform");
}
}
它總是去硬件是不支持的選擇。
此外,我可以通過藍牙在Android手機之間發送圖片,但是當我試圖發送到我的iPhone時,它被拒絕。 iOS藍牙是封閉的嗎?它不適用於其他藍牙設備?
下面的答案正確嗎? – mahboudz