0

I am trying to connect a heart rate monitor with my app and it is working properly in 4S and iPAD 3, but now I am testing it with iPhone 5, in that case it is giving me crash, I have followed this link also but no help. Please see the attached device log for any help. Please suggest.Device Log

Thanks

Community
  • 1
  • 1
york
  • 149
  • 1
  • 11
  • can u pls paste some code whatever u have written in Delegates methods. specially in "- (void)centralManagerDidUpdateState:(CBCentralManager *)central " – Satish Azad Oct 04 '13 at 09:10
  • - (void)centralManagerDidUpdateState:(CBCentralManager *)central { if (manager.state==CBCentralManagerStatePoweredOn) { self.isBluetoothDeviceConnected = [self isLECapableHardware]; if (self.isBluetoothDeviceConnected == NO) { NSLog(@"Bluetooth off"); } else { self.isBluetoothDeviceConnected = YES; [self startScan]; } } } – york Oct 04 '13 at 09:28
  • what is "manager" here in "manager.state". why not u r using central as u get a reference if CBCentralManager reference in "central" object – Satish Azad Oct 04 '13 at 09:36
  • Try this : - (void)centralManagerDidUpdateState:(CBCentralManager *)central { if (central.state==CBCentralManagerStatePoweredOn) { self.isBluetoothDeviceConnected = [self isLECapableHardware]; if (self.isBluetoothDeviceConnected == NO) { NSLog(@"Bluetooth off"); } else { self.isBluetoothDeviceConnected = YES; [self startScan]; } } } – Satish Azad Oct 04 '13 at 09:37
  • i have tried this also but no luck, manager is the reference of CBCentralManager object, Also below is my startScan method: - (void) startScan { if (self.manager.state == CBCentralManagerStatePoweredOn) { if (self.isBluetoothDeviceConnected == YES) { NSLog(@"Start scan called"); [self.manager scanForPeripheralsWithServices:[NSArray arrayWithObject:[CBUUID UUIDWithString:@"180D"]]options:nil]; } } } – york Oct 04 '13 at 09:38

0 Answers0