Typically bond handling is done by the OS, so I can't think that the app can control this. Are you using the latest iOS version? I guess the reason is as stated in this reply:
https://devzone.nordicsemi.com/f/nordic-q-a/60455/bonded-phone-with-ios-13-4-unable-to-connect-to-the-nrf52-with-deleted-bonding-information/246992#246992
As a peripheral device it is possible to change the gap address, this will then make the peripheral device appear as a new device. You can find an example here on how this can be done:
https://devzone.nordicsemi.com/f/nordic-q-a/37369/switching-keyboard-mouse-between-3-paired-devices/143932#143932
Kenneth
Thank you for your comment.
iOS is confirmed with the latest version.
Is changing the gap address a reproduction method?
In other words, is it possible to raise the same error by changing the gap address after connecting?
As a background, I think it is an error that has not occurred before, but it has occurred recently.
I would like to know if the error started to occur due to a problem with the implementation of the app,
or if the implementation of the app was irrelevant and it had occurred before.
Best regards,
kuma.
I consider your issue as working as intended. It is a security measure, to ensure that no attacker can fake/impersonate a bonded peer device. I assume it is intended that the user should delete previously bonded devices in iOS if the peer device have erased it's bond. The only way to avoid this would be if the peer device change the gap address, however this will leave the existing bond on iOS intact and instead create a new (it will thereby look like two peer devices have bonded to iOS).
Kenneth
I have a question.
Now that you know how to handle it on ios, why does the peer device erase the bond?
I would like to confirm whether it is a bug in the firmware implementation or a specification that occurs under specific conditions.
Best regards,
kuma.
applesan said:Now that you know how to handle it on ios, why does the peer device erase the bond?
I am not sure what control you have of the peer device here, but many peers devices try to only have one active bond, so once the peer device bond to a new central device it will erase the previously bonded central device.
Kenneth