我有一个使用 ble 连接到设备的 iOS 应用程序。iOS 7 正在运行。升级到 iOS 8 后,CBCentralManager 没有找到任何外围设备。
case CBCentralManagerStatePoweredOn:
{
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:FALSE], CBCentralManagerScanOptionAllowDuplicatesKey, nil];
//NSArray *services = [NSMutableArray new];
NSArray *services = @[[CBUUID UUIDWithString:@"0000FBB0-494C-4F47-4943-544543480000"], [CBUUID UUIDWithString:@"180A"]];
[centralManager scanForPeripheralsWithServices:services options:options];
break;
}