NordicSemiconductor / IOS-CoreBluetooth-Mock

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

wrap CBPeripherals as CBMPeripheralNative on restore #106

Closed kennylovrin closed 6 months ago

kennylovrin commented 6 months ago

I found when trying to restore state that it was tricky as the state contains CBPeripheral objects, but the rest of the code more or less relies on CBMPeripheral everywhere. One option would be to make the CBPeripheralNative.init public, but I think manipulating the state is more consistent with the CoreBluetoothMock API in general.

CLAassistant commented 6 months ago

CLA assistant check
All committers have signed the CLA.

philips77 commented 6 months ago

Hello, Thank you for the PR. Did you test it, and does it fix your issue? I have no sample to test state restoration.

kennylovrin commented 6 months ago

Hello, Thank you for the PR. Did you test it, and does it fix your issue? I have no sample to test state restoration.

Hi, I see it's already merged now, it's not a huge change. But yes I've tested it and I am using it currently. It does solve my issue in the sense that I now get objects that are more easily compatible with the rest of the library.

philips77 commented 6 months ago

Splendid! I will do a new release shortly.