CoreBluetooth peripheral service becomes empty while reconnecting/restoring

In my iOS app I am able to successfully connect to BLE peripherals, discover service and subscribe to characteristics so that app gets notified whenever there is a change in characteristic value. All these happens with no issues as long as app runs in background.


But issue occurs when state restoration happens. In

centralManager:willRestoreState:
method, I am able to retrieve previously connected peripherals using the method
retrieveConnectedPeripheralsWithServices:
. But nothing happens when I call
discoverServices:
method on the retrieved peripheral.
peripheral:didDiscoverServices:
method never gets called. The value of retrieved peripheral's services property is also null. Does iOS not cache the services and characteristics ?


Note: Our BLE peripheral advertises service initially. When the app launches for first time, it reads value from peripheral and writes user specific data to a characteristic. Post writing, peripheral stops advertising services. But firmware engineer claims that even though service is stopped by peripheral, peripheral retrieved from state restoration should have the cached service. Is it true ?

Replies

did you found any solution for this ?
if found then mail me link on shubhamtomar.spst@gmail.com