Hi,
I have an app that connects to peripherals and alerts when they go out of range. I’ve just discovered a bug which I cannot find a solution to so was wondering if it is an iOS issue or another known issue.
Sometimes when connected/subscribed to 2 peripherals and they go out of range didDisconnectPeripheral is called as expected, however I can not seem to reconnect and subscribe to them again.
I get to the point where didConnectPeripheral is called and I call [peripheral discoverServices:@[[CBUUID UUIDWithString:TRANSFER_SERVICE_UUID], [CBUUID UUIDWithString:TI_KEYFOB_BATT_SERVICE_UUID]]]; but didDiscoverServices is never called. Why would this not be called?
Now for the strange bit which makes me think it’s an iOS issue…
If I completely kill the app and relaunch it, I still have the same problem (Can’t discover services). If I delete the app and reinstall it, I still have the same problem.
The only way I can get the app to work properly again, is to reboot the phone at which point it’ll happily discover the services again.
Any help would be greatly appreciated.
Thanks
Darren |