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

# dismiss()

Dismisses the extension and marks it for termination.

```
func dismiss()
```

## Discussion

Call this method to dismiss the extension. The system displays the keyboard if there is any content in the Messages app’s input field. If the input field is empty, the system dismisses the keyboard entirely.

This method also marks the extension as eligible for termination, causing the system to call the view controller’s [`willResignActive(with:)`](/documentation/Messages/MSMessagesAppViewController/willResignActive(with:)) and [`didResignActive(with:)`](/documentation/Messages/MSMessagesAppViewController/didResignActive(with:)) methods.

---

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)