RtccDataDelegate Protocol Reference

Conforms to NSObject
Declared in RtccProtocols.h

Overview

This protocol presents the callbacks related to the data part of the SDK.

This notifies the app of message reception and their acknowledgement. You need to be registered to send and receive messages, registration happening automatically upon login. You are registered as soon as [RtccPresenceDelegate rtccPresenceRegistrationUpdate:] is fired with either registration_registered or registration_alreadyRegistered as parameter.

– rtccReceivedData:from:withID: required method

Fired when a contact calls [Rtcc dataSend:toContactUIDs:withID:] with your UID as one of the contactUIDs parameter.

You don’t need to be in this contact’s roster to receive message from them, no more than you need to have them in your roster.

- (void)rtccReceivedData:(NSData *)data from:(NSString *)contactUID withID:(int32_t)messageID
Parameters
data

The data received.

contactUID

The UID of the contact who send the message.

messageID

The id the remote contact attributed to the message. Used to acknowledge the message.

Declared In

RtccProtocols.h

– rtccReceivedAckForID:fromContact:withFlag: required method

Called when a remote contact calls [Rtcc dataAcknowledge:ofContact:withFlag:] with your UID as contactUID.

While this is mainly used to convey a notion of acknowledgment, this can be used to transmit other thing (i.e. a status like “writing a message”).

- (void)rtccReceivedAckForID:(int32_t)messageID fromContact:(NSString *)contactUID withFlag:(uint8_t)flag
Parameters
messageID

The ID of the message acknowledged.

contactUID

The UID of the contact who sent the message.

flag

This is implentation dependant. You can call [Rtcc dataAcknowledge:ofContact:withFlag:] multiple times for the same ID.

Declared In

RtccProtocols.h