Skip to content

Commit 8c2d4ac

Browse files
NickKibishgithub-actions[bot]
authored andcommitted
Copied files from native CoreBluetooth version to CoreBluetoothMock
1 parent 7b6ab22 commit 8c2d4ac

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Sources/iOS-BLE-Library-Mock/CentralManager/CentralManager.swift

+8-3
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,13 @@ extension CentralManager {
225225
///
226226
/// Calling this method stops an ongoing scan if it is already running and finishes the publisher returned by ``scanForPeripherals(withServices:)``.
227227
///
228-
/// - Parameter services: The services to scan for.
228+
/// - Parameters:
229+
/// - services: The services to scan for.
230+
/// - options: A dictionary to customize the scan, such as specifying whether duplicate results should be reported.
229231
/// - Returns: A publisher that emits scan results or an error.
230-
public func scanForPeripherals(withServices services: [CBUUID]?)
232+
public func scanForPeripherals(
233+
withServices services: [CBUUID]?, options: [String: Any]? = nil
234+
)
231235
-> AnyPublisher<ScanResult, Error>
232236
{
233237
stopScan()
@@ -252,7 +256,8 @@ extension CentralManager {
252256
return e
253257
}
254258
.bluetooth {
255-
self.centralManager.scanForPeripherals(withServices: services)
259+
self.centralManager.scanForPeripherals(
260+
withServices: services, options: options)
256261
}
257262
.autoconnect()
258263
.eraseToAnyPublisher()

0 commit comments

Comments
 (0)