iMessage Apps: A More In-Depth Look

This post includes some FAQs about iMessage and tips for developers who are interested in building interactive iMessages and iMessage apps. Click here for an overview of the additions to the iMessage app and WWDC 2016 in general.


What does using an iMessage app look like? 
  • Users get to your app by swiping through their Messages App Drawer 
  • They can see both compact and expanded views of your app, and have the ability to switch between the two whenever they want. (You are provided with willTransition and didTransition methods, which you can override to be prepared when users switch between the presentation styles.)
Compact view
Expanded view

How can people get my iMessage app?

  • From the app store dedicated to iMessage apps - your iMessage app doesn't need to be attached to a separate full app. 
  • If someone's friend sends them an iMessage through your app, they will see a link at the bottom of the iMessage where they can download your app. 
Messages app store


What can you do with the Messages framework?
  • Payments. This includes access to Apple Pay and in-app purchases. 
  • Camera access 
  • MSSession. You can update messages that users build collaboratively, instead of generating many half-completed messages that users will have to scroll through. (The most basic example of this would be tic tac toe, where each user would see a condensed history of changes and the most current board, instead of a bunch of boards from each move.)
    • Caution: This means that you can only access the most recent iMessage, not any of the messages in the history. (See the question about group chats below for more details on how this works.) 
  • Pass around image/video/audio and text. You can also store information (such as a record id from a database or a session token) in the message's url - this is especially important for group conversations (see below). See the image of the MSMessageTemplateLayout below, which shows how the data in a message is presented. A couple of tips I learned from the WWDC presentations and from talking to Apple engineers: 
    • Avoid rendering text in the image. This will prevent weird pixelated images when users access your app through their watches or various iPhones.
    • You shouldn't overload the iMessage template below with a lot of text and information. A user should be able to quickly glance at it to get the information they need. If they want more information, they can click on the iMessage to go to the expanded view. 
The layout of a message. (The icon in the top left corner is your iMessage app icon.)

What are the framework's limitations?

  • Your app is supported only on the iOS 10, watchOS and macOS platforms. (AKA not Android) Furthermore, on Macs, your iMessage will be delivered as an image (the one you provided) and possibly also a URL (if you include one). Users will be able to click on this link and expect to be connected to a site with some info relevant to the message. 
  • You will not be able to access users' messages or contact info. (See next question.)

What about privacy?

  • You have access to participant identifiers that represent the participants in the chat. Each sent iMessage has a sender identifier that you can match to a participant identifier. Furthermore, each device will have a unique local set of participant identifiers (the identifiers will be stable as long as your app is installed. If a user deletes and reinstalls your app, there will be a different set of generated identifiers.). So, what can you do? 
    • You can get the number of participants in a chat.
    • Match messages with identical sender identifiers to the same sender.  
    • If you have prefix a user identifier with a $, Apple will replace this with the actual name of the participant. (In their talk, the example was setting the message caption to "$\(conversation.localParticipantIdentifier.uuidString) likes Sprinkles!", which will be presented as "Chris likes Sprinkles!")

What about group chats?

  • As of now, Apple recommends that you store iMessage states in the cloud as users send messages. The message url can save a session token. Users can receive the message by using this token to access the most current version of the iMessage, and can update the message by pushing their changes to the cloud.