---
title: MSMessagesAppViewController
framework: messages
role: symbol
role_heading: Class
path: messages/msmessagesappviewcontroller
---

# MSMessagesAppViewController

The principal view controller for iMessage apps.

## Declaration

```swift
class MSMessagesAppViewController
```

## Mentioned in

Adding Sticker packs and iMessage apps to the system Stickers app, Messages camera, and FaceTime

## Overview

Overview Use this class to manage your extension. For more information on app extensions, see App Extension Programming Guide.

## Topics

### 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)
- [willResignActive(with:)](messages/msmessagesappviewcontroller/willresignactive(with:).md)
- [didResignActive(with:)](messages/msmessagesappviewcontroller/didresignactive(with:).md)

### Tracking Messages

- [willSelect(_:conversation:)](messages/msmessagesappviewcontroller/willselect(_:conversation:).md)
- [didSelect(_:conversation:)](messages/msmessagesappviewcontroller/didselect(_:conversation:).md)
- [didReceive(_:conversation:)](messages/msmessagesappviewcontroller/didreceive(_:conversation:).md)
- [didStartSending(_:conversation:)](messages/msmessagesappviewcontroller/didstartsending(_:conversation:).md)
- [didCancelSending(_:conversation:)](messages/msmessagesappviewcontroller/didcancelsending(_:conversation:).md)

### Working with Presentation Styles and Contexts

- [presentationStyle](messages/msmessagesappviewcontroller/presentationstyle.md)
- [requestPresentationStyle(_:)](messages/msmessagesappviewcontroller/requestpresentationstyle(_:).md)
- [willTransition(to:)](messages/msmessagesappviewcontroller/willtransition(to:).md)
- [didTransition(to:)](messages/msmessagesappviewcontroller/didtransition(to:).md)
- [MSMessagesAppPresentationStyle](messages/msmessagesapppresentationstyle.md)
- [presentationContext](messages/msmessagesappviewcontroller/presentationcontext.md)
- [MSMessagesAppPresentationContext](messages/msmessagesapppresentationcontext.md)

## Relationships

### Inherits From

- [UIViewController](uikit/uiviewcontroller.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [MSMessagesAppTranscriptPresentation](messages/msmessagesapptranscriptpresentation.md)
- [NSCoding](foundation/nscoding.md)
- [NSExtensionRequestHandling](foundation/nsextensionrequesthandling.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [UIActivityItemsConfigurationProviding](uikit/uiactivityitemsconfigurationproviding.md)
- [UIAppearanceContainer](uikit/uiappearancecontainer.md)
- [UIContentContainer](uikit/uicontentcontainer.md)
- [UIFocusEnvironment](uikit/uifocusenvironment.md)
- [UIPasteConfigurationSupporting](uikit/uipasteconfigurationsupporting.md)
- [UIResponderStandardEditActions](uikit/uiresponderstandardeditactions.md)
- [UIStateRestoring](uikit/uistaterestoring.md)
- [UITraitChangeObservable](uikit/uitraitchangeobservable-67e94.md)
- [UITraitEnvironment](uikit/uitraitenvironment.md)
- [UIUserActivityRestoring](uikit/uiuseractivityrestoring.md)

## See Also

### Custom iMessage app interface

- [IceCreamBuilder: Building an iMessage Extension](messages/icecreambuilder-building-an-imessage-extension.md)
- [Creating a Sticker App with a Custom Layout](messages/creating-a-sticker-app-with-a-custom-layout.md)
- [MSMessagesAppTranscriptPresentation](messages/msmessagesapptranscriptpresentation.md)
- [MSMessagesAppPresentationStyle](messages/msmessagesapppresentationstyle.md)
