---
title: MSMessageErrorCode.apiUnavailableInPresentationContext
framework: messages
role: symbol
role_heading: Case
path: messages/msmessageerrorcode/apiunavailableinpresentationcontext
---

# MSMessageErrorCode.apiUnavailableInPresentationContext

The API is unavailable in the current context.

## Declaration

```swift
case apiUnavailableInPresentationContext
```

## Mentioned in

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

## Discussion

Discussion Different contexts may support only a subset of the Message framework API. For more information, see the MSMessagesAppViewController class’s presentationContext property and the MSMessagesAppPresentationContext.media constant.

## See Also

### Error Codes

- [MSMessageErrorCode.fileNotFound](messages/msmessageerrorcode/filenotfound.md)
- [MSMessageErrorCode.fileUnreadable](messages/msmessageerrorcode/fileunreadable.md)
- [MSMessageErrorCode.improperFileType](messages/msmessageerrorcode/improperfiletype.md)
- [MSMessageErrorCode.improperFileURL](messages/msmessageerrorcode/improperfileurl.md)
- [MSMessageErrorCode.stickerFileImproperFileAttributes](messages/msmessageerrorcode/stickerfileimproperfileattributes.md)
- [MSMessageErrorCode.stickerFileImproperFileSize](messages/msmessageerrorcode/stickerfileimproperfilesize.md)
- [MSMessageErrorCode.stickerFileImproperFileFormat](messages/msmessageerrorcode/stickerfileimproperfileformat.md)
- [MSMessageErrorCode.urlExceedsMaxSize](messages/msmessageerrorcode/urlexceedsmaxsize.md)
- [MSMessageErrorCode.sendWhileNotVisible](messages/msmessageerrorcode/sendwhilenotvisible.md)
- [MSMessageErrorCode.sendWithoutRecentInteraction](messages/msmessageerrorcode/sendwithoutrecentinteraction.md)
- [MSMessageErrorCode.unknown](messages/msmessageerrorcode/unknown.md)
