Instance Property

presentationContext

The context describing where your iMessage app is presented.

Declaration

@property(nonatomic, readonly) MSMessagesAppPresentationContext presentationContext;

Discussion

By default, the system only displays iMessage apps in the MSMessagesAppPresentationContextMessages context (the iMessage app only appears inside the Messages app). iMessage apps in the media context have additional limitations and design considerations.

You can control the supported contexts by adding the MSSupportedPresentationContexts key to the iMessage app extension’s info.plist file. For example, Listing 1 enables the iMessage app in effects in Messages and FaceTime.

<key>MSSupportedPresentationContexts</key>
<array>
  <string>MSMessagesAppPresentationContextMessages</string>
  <string>MSMessagesAppPresentationContextMedia</string>
</array>

See Also

Working with Presentation Styles and Contexts

presentationStyle

The extension’s current presentation style.

- requestPresentationStyle:

Asks the extension’s user interface to transition to the provided style.

- willTransitionToPresentationStyle:

Tells the view controller that the extension is about to transition to a new presentation style.

- didTransitionToPresentationStyle:

Tells the view controller that the extension has transitioned to a new presentation style.

MSMessagesAppPresentationStyle

Presentation styles that describe your iMessage app’s appearance.

MSMessagesAppPresentationContext

Presentation contexts describing where your iMessage app appears.