NordicSemiconductor / IOS-CoreBluetooth-Mock

Mocking library for CoreBluetooth framework.
BSD 3-Clause "New" or "Revised" License
225 stars 51 forks source link

Bug fix: Retrieving peripherals multiple times #79

Closed philips77 closed 1 year ago

philips77 commented 1 year ago

This PR fixes an issue when a peripheral was retrieved multiple times using different central managers. The returned list consisted of multiple instances of the same CBMPeripheral object, one per each manager that retrieved it previously. All returned instances had the same UUID. Only one of them (the last one) was in fact kept in the new manager, and the other were not working.

This PR makes sure the returned list consists of unique instances.