NordicSemiconductor / IOS-CoreBluetooth-Mock

Mocking library for CoreBluetooth framework.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CBCentralManagerMock#connect API differs from the real one

NeverwinterMoon opened this issue · comments

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]?)

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