---
title: "willBecomeActive(with:)"
framework: messages
role: symbol
role_heading: Instance Method
path: "messages/msmessagesappviewcontroller/willbecomeactive(with:)"
---

# willBecomeActive(with:)

Invoked just before the Messages extension becomes active.

## Declaration

```swift
func willBecomeActive(with conversation: MSConversation)
```

## Parameters

- `conversation`: The conversation that the user is currently viewing in the Messages app.

## Discussion

Discussion Override this method to perform any setup steps necessary before the Messages extension becomes active. The extension becomes active both when the user selects the extension from the app drawer, and when the user selects a message in the transcript that represents an MSMessage object created by a copy of the extension.

## See Also

### Managing the Extension’s State

- [activeConversation](messages/msmessagesappviewcontroller/activeconversation.md)
- [dismiss()](messages/msmessagesappviewcontroller/dismiss().md)
- [didBecomeActive(with:)](messages/msmessagesappviewcontroller/didbecomeactive(with:).md)
- [willResignActive(with:)](messages/msmessagesappviewcontroller/willresignactive(with:).md)
- [didResignActive(with:)](messages/msmessagesappviewcontroller/didresignactive(with:).md)
