Client APIs

You can use the client instance obtained in initialisation to access the SDK APIs.

Session

// start and end session related services.
client.services.session;

// check if session is successfully started
client.isSuccessfullyCreated;

// user profile id for which the session was opened
client.profileID;

Messaging

Messaging can be accessed through:

// messaging related service calls
client.services.messaging;

🚧

Messaging data

Messages and Conversations API calls in the messaging service manage persistence store updates internally. Participants are not persisted and must be managed by the app if required.


Profiles

Profiles related APIs can be accessed through:

// user profile related service calls
client.services.profile;

🚧

Profiles data

Profiles are not persisted and and must be managed by the app if required.


Listeners

Profile, participants, and typing events are not managed with store implementation. The app should register appropriate listeners for relevant events.

// CMPTypingListener - user started/stopped typing in a conversation.
- (void)addTypingDelegate:(id<CMPTypingDelegate>)delegate;
- (void)removeTypingDelegate:(id<CMPTypingDelegate>)delegate;

// CMPProfileListener - changes to user profile details.
- (void)addProfileDelegate:(id<CMPProfileDelegate>)delegate;
- (void)removeProfileDelegate:(id<CMPProfileDelegate>)delegate;

// CMPParticipantsListener - changes to participant list in conversation.
- (void)addParticipantDelegate:(id<CMPParticipantDelegate>)delegate;
- (void)removeParticipantDelegate:(id<CMPParticipantDelegate>)delegate;