IOS 10 is the most open version in history. The message framework is open to developers.
The new message framework provided by Apple on WWDC 2016 for iOS allows developers to create application extensions that interact with Apple's "information" applications. The new message API currently supports two types of extensions:
The Sticker Pack provides a series of images that can be inserted into messages for users to publish.
IMessage application, which can be used to access external applications in "information" applications.
No code is required for the sticker application. You only need to copy the image to a project template provided by Xcode to create it. At the same time, the iMessage application can use the complete message framework, which will be further described below. According to Apple's instructions, the iMessage application can directly share, pay, play games, collaborate, and other functions within the message.
The message framework contains a series of basic classes for developers:
MSMessageAppViewController: This class provides a main view control for message extension. It can be used to display custom user interfaces, manage extended statuses, obtain current dialogs, and send tracing information.
MSStickerBrowserViewController, MSStickerBrowserView, and MSStickerBrowserViewDataSource: these classes can be used to customize and present a custom or dynamic Sticker browser (Sticker browser ). To provide dynamic content for the sticker browser, You can implement a custom MSStickerBrowserViewDataSource. To customize the appearance of the default sticker browser, You can provide your own MSStickerBrowserView and customize the browser size and sticker size. You can use the MSStickerView subclass to obtain further customization capabilities.
MSConversation: this class is used to present a conversation and insert the input fields of the message to send text, stickers, attachments, or message objects.
MSMessage: This class can be used to create interactive messages and access message attributes, such as senders, sessions described in messages, and optional URLs associated with messages.
MSSession: This class can be used to identify messages and perform subsequent updates. For example, this class can be used in game or collaborative applications.
The message framework released this time can be used in the Xcode 8 test version. Registered developers can download this version for free.