init(transport:data:)
Initializes a payload with data and a transport preference.
Declaration
init(transport: AccessoryTransport = .bluetooth, data: Data)Parameters
- transport:
The preferred transport method for the payload. The default is Bluetooth.
- data:
The payload content.
Discussion
If the specified transport method isn’t available, the system chooses any available transport method.