I'm developing an app that pairs to a custom piece of hardware over BLE. Right now I'm working on a way to handle the case where the user mis-enters the PIN code. I see that didUpdateNotificationStateFor is passed an error message in this case saying "Encryption is insufficient.". But it seems like there has to be a better way to handle and react to that case.
Do I really need to rely on a string-compare against error message in order to determine when to display the instructions on how to reset everything and restart the pairing workflow? Is there something I'm missing in this documentation?