Distinguish disconnected and forgotten BLE device

Hello,

I am working on an application which communicate with a BLE device.

To show to the user the correct actions that he has to perform, I would like to distinguish the cases where the device is not connected fro mthe system (BLE off on the device, too far, ...) and the case where the Device has been forgotten in the System settings.

To retreive the peripherals which are already bonded from a previous session, I use the following method:
Code Block swift
CBCentralManager.retrievePeripherals(withIdentifiers:)

When the device is still bonded in the system, I retrieve it correctly.
However, when I forget the device in the system settings, I have two cases which are confusing.
  • If I forget the device from the system (so the Phone and the Device can't communicate), I can still retreive the peripheral from the previous method without any problem altough they are not bonded anymore.

  • But if If reboot my phone and then use the same method to retreive the device, then the device that has been forgotten doesn't appears anymore.

Based on this, I have two question:
  • Is it possible to know if a device has been forgotten in the system settings ?

  • Is it 'normal' that the device still appears in the retreivedPeripherals when it has benn forgotten ?

Thank's