messageHandler(_:)
Handles decrypted messages received from the paired accessory.
Declaration
func messageHandler(_ message: TransportMessage)Parameters
- message:
The decrypted message payload from the accessory.
Discussion
The system calls this method when your accessory sends data through the transport extension. The message arrives decrypted and ready for processing. Parse the message to determine the response type (notification action, user text input, or alert confirmation) and handle accordingly using the session’s response methods.