well, I have an application that scan and connect to to a 'bluetooth le' device under ios 6.0.1 but on iphone 4s, and it works good. when upload the application to the apple store, they return me an application crash, bat programming, but I only understand the crash when I try the application on an iphone5 where the
- (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI;
return me a peripheral with null uuid.
I print the peripheral, the name, the uuid, the rssi and the advertData, everything is good but the uuid is null, and I use the uuid in the application. this make my application crash, I can control the null uuid, and this means that I can't control the application.
Somebody knows what happens, and a possible solution?
What we have to do is the next: You cant write the peripheral object with a NSLog, but we can't have the peripheral uuid property before connect was executed. It always was null. We ask for the uuid when the services read was finished, not before, and then we can't run the applications on i-phone5 without crash.
I read it about on TI (texas instruments) that it was a ios bug, but I thing it is a ble security update, we need to connect before ask fore the uuid.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With