Client APIs

You can use Comapi client instance obtained in Initialisation to access 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 (conversations and messages) can be accessed through

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

🚧

messaging data

Messages and Conversations API calls in messaging service will manage persistence store updates internally. Participants are NOT persisted and need to be managed by the app if needed.

profiles

Profiles related APIs can be accessed through

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

🚧

profiles data

Profiles are NOT persisted and need to be managed by the app if needed.

Listeners

Profile, participants and typing events are not managed with store implementation and 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;