SIGN UP

VIMessengerDelegate

Delegate that may be used to handle messenger events.

Methods are invoked either on:

  • the current user's side only. The events always invoked only on a client where messaging methods are called (unless otherwise specified).
  • or both current user's and other participants' sides.

See the details in the methods' descriptions.

A queue on which all events will be received is specified via [VIClient initWithDelegateQueue:].

Methods

messenger:didCreateConversation:

- (void)messenger:(VIMessenger *)messenger
    didCreateConversation:(VIConversationEvent *)event

Invoked when a conversation is created via [VIMessenger createConversation:completion:] or analogous methods from other Voximplant SDKs and Messaging API.

Triggered only for participants that belong to the conversation.

Parameters

messenger:didEditConversation:

- (void)messenger:(VIMessenger *)messenger
    didEditConversation:(VIConversationEvent *)event

Invoked when the conversation properties were modified as the result of:

Triggered only for participants that belong to the conversation.

Parameters

messenger:didEditMessage:

- (void)messenger:(VIMessenger *)messenger
   didEditMessage:(VIMessageEvent *)event

Invoked when a message was edited via [VIMessage update:payload:completion:] or analogous methods from other Voximplant SDKs and Messaging API.

Triggered only for participants that belong to the conversation with the changed message.

Parameters

messenger:didEditUser:

- (void)messenger:(VIMessenger *)messenger
      didEditUser:(VIUserEvent *)event

Invoked as the result of [VIMessenger editUserWithCustomData:privateCustomData:completion:], [VIMessenger managePushNotifications:completion:] or analogous methods from other Voximplant SDKs and Messaging API.

Triggered only for the subscribers of the changed user. Use [VIMessenger subscribe:completion:] to subscribe for user's changes.

Parameters

  • messenger:

    VIMessenger *

    Instance of messenger

  • event:

    VIUserEvent *

    Event object with user data and service information

messenger:didGetConversation:

- (void)messenger:(VIMessenger *)messenger
    didGetConversation:(VIConversationEvent *)event

Invoked when a conversation description is received as the result of the [VIMessenger getConversation:completion:] or [VIMessenger getConversations:completion:] methods calls.

Triggered only on the current user's side.

Parameters

messenger:didGetPublicConversations:

- (void)messenger:(VIMessenger *)messenger
    didGetPublicConversations:(VIConversationListEvent *)event

Invoked when the array of public conversations UUIDs is received as the result of the [VIMessenger getPublicConversations:] method call.

Triggered only on the current user's side.

Parameters

messenger:didGetSubscriptionList:

- (void)messenger:(VIMessenger *)messenger
    didGetSubscriptionList:(VISubscriptionEvent *)event

Invoked as the result of the [VIMessenger getSubscriptionList:] method call.

Triggered only on the current user's side.

Parameters

messenger:didGetUser:

- (void)messenger:(VIMessenger *)messenger
       didGetUser:(VIUserEvent *)event

Parameters

  • messenger:

    VIMessenger *

    Instance of messenger

  • event:

    VIUserEvent *

    Event object with user data and service information

messenger:didReceiveError:

- (void)messenger:(VIMessenger *)messenger
  didReceiveError:(VIErrorEvent *)event

Invoked when an error occurred as the result of any Voximplant iOS Messaging API methods call.

Triggered only on the current user's side.

Parameters

  • messenger:

    VIMessenger *

    Instance of messenger

  • event:

    VIErrorEvent *

    Event object with error details and service information

messenger:didReceiveReadConfirmation:

- (void)messenger:(VIMessenger *)messenger
    didReceiveReadConfirmation:(VIConversationServiceEvent *)event

Invoked for all clients in the conversation as the result of [VIConversation markAsRead:completion:] or analogous methods from other Voximplant SDKs and Messaging API.

Parameters

messenger:didReceiveTypingNotification:

- (void)messenger:(VIMessenger *)messenger
    didReceiveTypingNotification:(VIConversationServiceEvent *)event

Invoked when some user is typing text in a conversation. Information about typing is received via [VIConversation typing:] or analogous methods from other Voximplant SDKs and Messaging API.

Triggered only for participants that belong to the conversation where typing is performing.

Parameters

messenger:didRemoveConversation:

- (void)messenger:(VIMessenger *)messenger
    didRemoveConversation:(VIConversationEvent *)event

Invoked when a conversation was removed.

Note that removing is possible via Voximplant Messaging API only.

Triggered only for participants that belong to the conversation.

Parameters

messenger:didRemoveMessage:

- (void)messenger:(VIMessenger *)messenger
 didRemoveMessage:(VIMessageEvent *)event

Invoked when a message was removed from a conversation via [VIMessage remove:] or analogous methods from other Voximplant SDKs and Messaging API.

Triggered only for participants that belong to the conversation with the deleted message.

Parameters

messenger:didRetransmitEvents:

- (void)messenger:(VIMessenger *)messenger
    didRetransmitEvents:(VIRetransmitEvent *)event

Invoked as the result of the following methods calls on some conversation for this SDK instance:

Triggered only on the current user's side.

Parameters

messenger:didSendMessage:

- (void)messenger:(VIMessenger *)messenger
   didSendMessage:(VIMessageEvent *)event

Invoked when a new message was sent to a conversation via [VIConversation sendMessage:payload:completion:] or analogous methods from other Voximplant SDKs and Messaging API.

Triggered only for participants that belong to the conversation.

Parameters

messenger:didSetStatus:

- (void)messenger:(VIMessenger *)messenger
     didSetStatus:(VIStatusEvent *)event

Invoked after a user status was changed via [VIMessenger setStatus:completion:] or analogous methods from other Voximplant SDKs and Messaging API.

Triggered only for the subscribers of the changed user. Use [VIMessenger subscribe:completion:] to subscribe for a user's changes.

Parameters

  • messenger:

    VIMessenger *

    Instance of messenger

  • event:

    VIStatusEvent *

    Event object with user status data and service information

messenger:didSubscribe:

- (void)messenger:(VIMessenger *)messenger
     didSubscribe:(VISubscriptionEvent *)event

Invoked as the result of [VIMessenger subscribe:completion:] or analogous methods from other Voximplant SDKs and Messaging API.

Triggered on all logged in clients of the current user

Parameters

messenger:didUnsubscribe:

- (void)messenger:(VIMessenger *)messenger
   didUnsubscribe:(VISubscriptionEvent *)event

Invoked as the result of [VIMessenger unsubscribe:completion:], [VIMessenger unsubscribeFromAll:] or analogous methods from other Voximplant SDKs and Messaging API.

Triggered on all logged in clients of the current user.

Parameters