The TemperatureSensor.app example code is a great starting point for getting familiar with Bluetooth LE. However, there is a bug in the app which had me stomped for a few days. Others may be smart enough and immediately find it, but I thought I would share it here (I tried to file a bug report, but the bug report website is giving me a bug today)
The TemperatureSensor.app contains the following callback for the "retrievePeripheral" call
- (void) centralManager:(CBCentralManager *)central didRetrievePeripheral:(CBPeripheral *)peripheral { [central connectPeripheral:peripheral options:nil]; [discoveryDelegate discoveryDidRefresh]; }
This does not exist, and will therefore never be invoked.
The proper call-back is: - (void)centralManager:(CBCentralManager *)central didRetrievePeripherals:(NSArray *)peripherals{ NSLog(@"Got a callback from didRetrievePeripherals"); }
|