【发布时间】:2012-11-18 04:24:50
【问题描述】:
我无法识别通常会导致我能够正确使用 NSLog() 的外围设备。
- (void)centralManager:(CBCentralManager *)central didRetrievePeripherals:(NSArray *)peripherals {
NSLog(@"discovered peripherals: %@", howToListPeriphalsForDebugging);
}
谢谢
【问题讨论】:
-
您在
NSLog上面遇到的问题是什么?如果我是正确的CBPeripheral是一个指针,您可以将它与%@一起使用。 -
我正在研究更多。其实我现在还没到那里……
-
你试过了吗:
NSLog(@"discovered peripherals: %@", peripherals);?看起来该数组是CBPeripheral对象的数组。 -
OK,已修复,现在可以测试了。你可以 NSLog() 它。
-
你也可以,
NSLog(@"%@",[peripherals description]);
标签: ios ios6 bluetooth-lowenergy cbperipheral cbcentralmanager