Initializer

init(session:)

Initializes a new message that is part of the provided session.

Declaration

init(session: MSSession)

Parameters

session

The session object tracking an updatable exchange of messages.

Return Value

A newly initialized message.

Discussion

Use this initializer to create an updatable message. Messages that are part of a session receive special treatment by the Messages app. When the app receives a message that is part of an existing session, the previous message is moved to the bottom of the transcript and updated with the new message’s content.