Understanding iMessage apps

An iMessage app is really an app extension that lives inside iMessage. It's kind of a weird type of extension because it behaves like a hybrid between an extension and an application. Extensions typically contain a single view controller and, more importantly, they can't be distributed through the iOS ecosystem without containing an application.

This rule does not apply to iMessage apps. An iMessage app can be distributed directly through the iMessage app store without a containing application. This means that you can build an iMessage app, such as a sticker pack, and distribute it without associating any other app to it. Also, you can add in-app purchases to an iMessage app. In-app purchases are normally unavailable to extensions, which makes iMessage apps behave more like an app than an extension.

Apart from distribution and in-app purchases, iMessage apps behave just like other extensions. They are created on behalf of a host application, Messages in this case, and they have a relatively short lifespan. An iMessage app specializes in sending messages from one user to another. These messages are shaped and created inside your extension and added to the conversation by sending them. An iMessage app can contain or send three different types of messages:

  • Interactive messages
  • Stickers
  • Media content

An interactive message is intended to be tapped by the receiving user so they can interact with it somehow. Stickers are a special kind of image that the user can place right on top of other messages or send as a single image. Media content is distributed in the form of photos, videos, links, and any other type of content that iMessage natively supports. iMessage apps are built using the Messages framework. This framework has been created explicitly for iMessage extensions, and it functions as a gateway from your app into the conversation that your user is currently having.

As mentioned before, iMessage apps can be distributed without a host application. This means that you can distribute your iMessage app independently of any other app. Even though app icons inside of images are not squares, you must still provide an app icon that is square and would otherwise be used on the user's home screen by a containing app. This image is required to display the extension in the settings app and other places in iOS where a square app icon is required.

If you do have a containing app for your iMessage app, users can directly add the iMessage app to their list of available apps through the iMessage App Store without having to download it separately. The simplest app you can build for iMessage is a sticker pack. Let's go ahead and create one so we can start exploring iMessage apps in the simulator.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.104.238