Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/103.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iOS 8蓝牙无法找到任何设备_Ios_Bluetooth_Ios8_Bluetooth Lowenergy - Fatal编程技术网

iOS 8蓝牙无法找到任何设备

iOS 8蓝牙无法找到任何设备,ios,bluetooth,ios8,bluetooth-lowenergy,Ios,Bluetooth,Ios8,Bluetooth Lowenergy,我用蓝牙ios应用程序控制arduino。我的应用程序在ios7上运行良好。所以我更新了ios 8,但它不工作。我是新手程序员。我如何适应ios8?这是查找外围设备代码。库是否已更新?可能还有另一个委托方法处理定位的外围设备。您需要显示更多代码。ios7和iOS8之间的主要变化是ios7发出警告,如果您在开机状态之前尝试执行操作,iOS8将失败。您的CentralManagerDipDateState方法是什么?@Paulw11这里的uuid似乎不适用于ios8?您在didUpdateState

我用蓝牙ios应用程序控制arduino。我的应用程序在ios7上运行良好。所以我更新了ios 8,但它不工作。我是新手程序员。我如何适应ios8?这是查找外围设备代码。

库是否已更新?可能还有另一个委托方法处理定位的外围设备。您需要显示更多代码。ios7和iOS8之间的主要变化是ios7发出警告,如果您在开机状态之前尝试执行操作,iOS8将失败。您的
CentralManagerDipDateState
方法是什么?@Paulw11这里的uuid似乎不适用于ios8?您在
didUpdateState
中没有执行任何操作-重要的是,您要实现此方法,以确保在通电之前不会调用
scanforPeripherSwithServices
。我知道您在
findHMSoftPeripherals
中检查了状态,但是如果返回-1,您还记得这个方法吗?
- (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; 
}