iOS 8蓝牙BLE找不到任何设备

时间:2014-12-13 20:22:26

标签: ios bluetooth ios8 bluetooth-lowenergy

- (int) findHMSoftPeripherals:(int)timeout {
    if ([manager state] != CBCentralManagerStatePoweredOn) {
        printf("CoreBluetooth is not correctly initialized !\n");
        return -1;
    }

    [NSTimer scheduledTimerWithTimeInterval:(float)timeout target:self
                                   selector:@selector(scanTimer:) 
                                   userInfo:nil repeats:NO];

    //[manager scanForPeripheralsWithServices:[NSArray arrayWithObject:serviceUUID]
                                      options:0]; // start Scanning

    [manager scanForPeripheralsWithServices:nil options:0];
    return 0; 
}

我用蓝牙ios app控制arduino。我的应用程序在ios7上运行良好。所以我更新了ios 8无法正常工作。我是新手编码器。我如何适应ios8?这里是查找外围设备代码。

0 个答案:

没有答案