Our iOS app runs in the peripheral role. A hardware accessory acts as the central: it connects to the app and bonds in order to read and write characteristics we declare with encryption-required permissions. The app advertises so a previously bonded accessory can reconnect on its own.
The problem is that the bond lives on both sides and we can only clear one of them. The accessory has its own "forget this phone" function, and it can also be told to do so remotely. iOS keeps its half, and we have not found any way for the app to remove or invalidate it.
What we've checked:
CBPeripheralManager and CBCentral expose no unpair or unbond operation. A CBCentral is only visible while connected or subscribed, and its identifier is a resolved handle.
Questions:
Is there a supported way for an app in the peripheral role to remove or invalidate the pairing keys for a bonded central? If we've missed an API, please point us at it.
If not, what's the recommended approach when the peer has discarded its keys and the bond is no longer usable?
Can a peripheral-role app detect that state — a distinguishable error or connection event when encryption fails — so we can tell the user something accurate instead of a generic connection failure?
3
0
97