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

# willResignActive(with:)

Invoked just before the message resigns its active status.

## Declaration

```swift
func willResignActive(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 cleanup activities just before the Messages extension is dismissed. Avoid doing any time-consuming tasks in your implementation. This method should return as quickly as possible. Also, avoid making asynchronous calls, because the extension might terminate before the asynchronous tasks have completed.

## See Also

### Managing the Extension’s State

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