Initializer

init(identifier:conversationIdentifier:content:dateSent:sender:recipients:groupName:messageType:)

Initializes a message object with the specified unique identifier and content.

Declaration

init(identifier: String, conversationIdentifier: String?, content: String?, dateSent: Date?, sender: INPerson?, recipients: [INPerson]?, groupName: INSpeakableString?, messageType: INMessageType)

Parameters

identifier

The app-specific unique identifier for the message. Specify a value that you can use to identify the same message later.

conversationIdentifier

The identifier for the conversation containing the message. Use this parameter to associate individual messages with a larger discussion among a specific group of users.

content

Text contained in the message.

dateSent

The date that the message was sent.

sender

The user that sent the message. Specify an INPerson object with enough information for you to uniquely identify the user later.

recipients

The users that received the message. Provide an INPerson object for each recipient. Each object must contain enough information for you to uniquely identify the user later.

groupName

The name of the group that received the message.

messageType

The type of content contained in the message.

Return Value

An initialized INMessage object or nil if there was a problem creating the object.

See Also

Initializing a Message Object