<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Messages",
  "identifier" : "/documentation/Messages/MSMessagesAppViewController/willSelect(_:conversation:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Messages"
    ],
    "preciseIdentifier" : "c:objc(cs)MSMessagesAppViewController(im)willSelectMessage:conversation:"
  },
  "title" : "willSelect(_:conversation:)"
}
-->

# willSelect(_:conversation:)

Invoked in response to the user selecting a message object in the transcript, before the system updates the conversation’s [`selectedMessage`](/documentation/Messages/MSConversation/selectedMessage) property.

```
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`](/documentation/Messages/MSConversation/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`](/documentation/Messages/MSMessagesAppViewController/presentationStyle) property is [`MSMessagesAppPresentationStyle.transcript`](/documentation/Messages/MSMessagesAppPresentationStyle/transcript), or if its [`presentationContext`](/documentation/Messages/MSMessagesAppViewController/presentationContext) property is [`MSMessagesAppPresentationContext.media`](/documentation/Messages/MSMessagesAppPresentationContext/media).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)