Create app extensions that interact with the Messages app, allowing users to send text, stickers, media files, and interactive messages. Update interactive messages, adjusting the state of each message as the conversation’s participants interact with it.
- iOS 10.0+
You can use the Messages framework to create two types of app extensions: Sticker packs and iMessage apps. Both extension types can be created as standalone apps or as app extensions within a containing iOS app.
For more information on creating and working with app extensions, see App Extension Programming Guide.
Sticker packs simply provide static sets of stickers, images that users can send inline as messages or peel off and attach to message bubbles in the transcript. Sticker packs do not require any code. You add stickers by dragging image files into the Sticker Pack folder inside the Stickers asset catalog. Valid image files must meet the following specifications:
The image must be a PNG, APNG, GIF, or JPEG file.
The file must be less than 500 KB.
For the best results, the image should not be smaller than 100 x 100 points or larger than 206 x 206 points.
Messages supports three sticker sizes, which are displayed in a grid-based browser. In the Xcode Attributes inspector, pick one of the following sizes for your sticker pack:
Small. 100 x 100 points @3x (300 x 300 pixels).
Medium. 136 x 136 points @3x (408 x 408 pixels).
Large. 206 x 206 points @3x (618 x 618 pixels).
For optimal quality and performance, provide sticker images of the size you choose.
To learn more about creating animated stickers, see Creating Stickers with Motion.
To learn more about submitting sticker packs to the App Store, see Preparing Sticker Submissions.
iMessage apps leverage the full framework to interact with the Messages app.
Use iMessage apps to:
Present a custom user interface inside the Messages app; see
App View Controller
Create a custom or dynamic sticker browser; see
Browser View Controller
Insert text, stickers, or media files into the Messages app’s input field; see
Create interactive messages that carry app-specific data; see
Update interactive messages (for example, to create games or collaborative apps); see
To learn more about submitting iMessage Apps to the App Store, see Preparing Your iMessage App for Submission.