NordicSemiconductor / IOS-CoreBluetooth-Mock

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

CBCentralManagerMock#connect API differs from the real one #47

Closed NeverwinterMoon closed 3 years ago

NeverwinterMoon commented 3 years ago

This is minor, but still forced me to change the production code in order to accommodate for CBM.

With the real API there is a default nil value for options, so I used this: centralManager.connect(retrievedPeripheral), with CBM, it's necessary to set options explicitly, even if it's a nil.

open func connect(_ peripheral: CBPeripheral, options: [String : Any]? = nil) vs open func connect(_ peripheral: CBMPeripheral, options: [String : Any]?)

philips77 commented 3 years ago

Fixed and will be released in the next version. I also fixed the same issue in scanForPeripherals and registerForConnectionEvents methods.