problem to connect Bluetooth device like wristband in ios 8 even existing code not finding Bluetooth and main thing it working very fine on ios 7..my code is as suggest me any idea or changes in ios 8 for Bluetooth..
-(void)connecttodevice {
// Scan for all available CoreBluetooth LE devices
NSArray *services = @[[CBUUID UUIDWithString:info_UUID],[CBUUID UUIDWithString:info_UUID_service],[CBUUID UUIDWithString:BAND_SERVICE_INFO]];
NSLog(@"device connting.....");
CBCentralManager *centralManager = [[CBCentralManager alloc] initWithDelegate:self queue:nil];
[centralManager scanForPeripheralsWithServices:services options:nil];
self.centralManager = centralManager;
}
Your problem is that you are invoking scanForPeripheralsWithServices immediately after creating the CBCentralManager rather than waiting until the central manager is in the powered on state as indicated in the
centralManagerDidUpdateState
delegate.in iOS 7 starting the scan before the power on state was indicated issued a warning on the console. In iOS 8 it doesn't start the scan.