You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
``CBMPeripheralSpec/simulateMacChange(_:)`` - simulates the device changing its MAC address.
167
-
The iDevice will not contain any cached information about the device, as with the new MAC it is
168
-
considered to be a new device.
169
-
170
-
171
-
### Bluetooth State Changes
172
-
173
-
``CBMCentralManagerMock/simulatePeripherals(_:)`` - creates a simulation with given list of mock
174
-
peripheral. This method should be called when the manager is powered off, or before any
175
-
central manager was initialized.
176
-
177
-
``CBMCentralManagerMock/simulateInitialState(_:)`` - this method should be called before any central
178
-
manager instance was created. It defines the initial state of the mock central manager.
179
-
By default, the manager is powered off.
180
-
181
-
``CBMCentralManagerMock/simulatePowerOn()`` - turns on the mock central manager.
16
+
## Topics
182
17
183
-
``CBMCentralManagerMock/simulatePowerOff()`` - turns off the mock central manager.
184
-
All scans and connections will be terminated.
18
+
### How to migrate a project to CoreBluetooth Mock framework
185
19
186
-
``CBMCentralManagerMock/tearDownSimulation()`` - sets the state of all currently existing central
187
-
managers to ``CBMManagerState/unknown`` and clears the list of managers and peripherals bringing
188
-
the mock manager to initial state.
20
+
-<doc:Migration-guide>
189
21
190
-
``CBMCentralManagerMock/simulateStateRestoration`` - this closure will be used when you initiate a
191
-
central manager with ``CBMCentralManagerOptionRestoreIdentifierKey`` option. The map returned will be
192
-
passed to ``CBMCentralManagerDelegate/centralManager(_:willRestoreState:)-9qavl`` callback in
193
-
central manager's delegate.
22
+
### How to create mock peripherals
194
23
195
-
``CBMCentralManagerMock/simulateFeaturesSupport`` - this closure will be used to emulate Bluetooth
196
-
features supported by the manager. It is available on iOS 13+, tvOS 13+ or watchOS 6+.
24
+
-<doc:Mocking-peripherals>
197
25
198
-
``CBMCentralManagerMock/simulateAuthorization(_:)`` - simulates the current authorization state
199
-
of a Core Bluetooth manager. When any value other than `.allowedAlways` is returned, the
200
-
``CBMCentralManager`` will change state to ``CBMManagerState/unauthorized``.
26
+
### How to simulate test events
201
27
202
-
## Known limitations
28
+
-<doc:Simulation>
203
29
204
-
As ``CBMPeripheral`` is a *protocol*, the KVO features are not available. See [#10](https://github.com/NordicSemiconductor/IOS-CoreBluetooth-Mock/issues/10).
0 commit comments