Instance Method

willSelect(_:conversation:)

Invoked in response to the user selecting a message object in the transcript, before the system updates the conversation’s selectedMessage property.

Declaration

func willSelect(_ message: MSMessage, conversation: MSConversation)

Parameters

message

The message selected by the user.

conversation

The current conversation.

Discussion

This method is called when the user selects one of your app’s message objects in the transcript while your extension is active. You can access the previously selected message (if any) from the conversation object’s selectedMessage property.

This method is called when a new message arrives while your extension is active. You receive notifications about messages sent using your extension only. You cannot interact with messages from other extensions.

The system does not call this method if the controller’s presentationStyle property is MSMessagesAppPresentationStyle.transcript, or if its presentationContext property is MSMessagesAppPresentationContext.media.

See Also

Tracking Messages

func didSelect(MSMessage, conversation: MSConversation)

Invoked in response to the user selecting a message object in the transcript, after the system updates the conversation’s selectedMessage property.

func didReceive(MSMessage, conversation: MSConversation)

Invoked when the iMessage app receives a new message object.

func didStartSending(MSMessage, conversation: MSConversation)

Invoked when the user sends a message object.

func didCancelSending(MSMessage, conversation: MSConversation)

Invoked when the user deletes a message object from the Messages app’s input field.