protocol MockDeviceKitInterface: Sendable
isEnabled
: Bool
[Get] |
Whether MockDeviceKit is currently enabled.
|
pairedDevices
: [MockDevice]
[Get] |
The list of all currently paired mock devices.
|
permissions
: MockPermissions
[Get] |
Interface for configuring mock permission behavior.
|
disable
()
|
Disables MockDeviceKit, restoring real providers and unpairing all mock devices.
Signature
public func disable() |
enable
(
config
)
|
Enables MockDeviceKit, injecting fake providers into the registration and device layers.
Safe to call regardless of whether Wearables.configure() has been called — MockDeviceKit will auto-configure Wearables if needed.
Signature
public func enable( config: MockDeviceKitConfig) Parameters |
pairGlasses
(
model
)
|
Pairs a simulated glasses device of the specified model.
Signature
public func pairGlasses( model: GlassesModel) -> MockGlasses Parameters Throws |
startTestServer
(
portFilePath
)
|
Starts a local test server for mock device communication.
Signature
public func startTestServer( portFilePath: String?) -> UInt16 Parameters portFilePath: String?
Optional path to a file where the server port will be written.
Returns UInt16
The port number the server is listening on.
|
stopTestServer
()
|
Stops the running test server.
Signature
public func stopTestServer() |
unpairDevice
(
device
)
|
Unpairs a simulated device.
Signature
public func unpairDevice(_ device: MockDevice) Parameters |