Send and Receive Text Messages
Overview
This guide covers sending and receiving messages within a conversation.
Before you begin, make sure you added the SDK to your app and you are able to create a conversation.
NOTE: A step-by-step tutorial to build a chat application is available here.
This guide will make use of the following concepts:
- Conversation Events -
messageevents that fire on a Conversation, after you are a Member
Send a Text Message
Given a conversation you are already a member of:
Receive a Text Message
A message conversation event will be received when a member sends a text message to a conversation:
Add NXMConversationDelegate as an extension to a ViewController or similar, and implement conversation(_ conversation: NXMConversation, didReceive event: NXMMessageEvent):
Note: The first method below is required when implementing NXMConversationDelegate:
Have a ViewController, or similar, conform to NXMConversationDelegate and implement conversation:didReceiveMessageEvent::
Note: The first method below is required when implementing NXMConversationDelegate: