Called when an immediate data message arrives and requires a response.
- iOS 9.0+
- watchOS 2.0+
The session object that received the data from its counterpart.
The data object received from the counterpart. Use the contents of this object to determine what course of action to take.
A reply block to execute with the response. This block has no return value and takes the following parameter:
A data object containing your response to
This method is called in response to a message sent by the counterpart process using the
send method. This specific method is called when the counterpart specifies a valid reply handler, indicating that it wants a response. Use this method to process the message data and provide an appropriate reply. You must execute the
reply block as part of your implementation.
Use messages to communicate quickly with the counterpart process. Messages can be sent and received only while both processes are active and running.
The delivery of multiple messages occurs serially, so your implementation of this method does not need to be reentrant. This method is called on a background thread of your app.