SINMessageClientDelegate Protocol Reference

Conforms to NSObject
Declared in SINMessageClient.h

Overview

The message client delegate by which message events are communicated.

– messageClient:didReceiveIncomingMessage: required method

Tells the delegate that a message has been received.

- (void)messageClient:(id<SINMessageClient>)messageClient didReceiveIncomingMessage:(id<SINMessage>)message

Parameters

messageClient

The message client that is informing the delegate.

message

The incoming message.

Declared In

SINMessageClient.h

– messageSent:recipientId: required method

Tells the delegate that a message for a specific recipient has been sent by the local user.

- (void)messageSent:(id<SINMessage>)message recipientId:(NSString *)recipientId

Parameters

message

Message that was sent.

recipientId

Recipient of the message

Discussion

This method is called when a message is sent from the local message client (i.e. [SINMessageClient sendMessage:]). This callback is triggered on all devices on which the local user is logged in.

Declared In

SINMessageClient.h

– messageDelivered: required method

Tells the delegate that a message has been delivered (to a particular recipient).

- (void)messageDelivered:(id<SINMessageDeliveryInfo>)info

Parameters

info

Info identifying the message that was delivered, and to whom.

Declared In

SINMessageClient.h

– messageFailed:info: required method

Tells the delegate that the message client failed to send a message.

- (void)messageFailed:(id<SINMessage>)message info:(id<SINMessageFailureInfo>)messageFailureInfo

Parameters

message

The message that could not be delivered.

messageFailureInfo

SINMessageFailureInfo object, identifying the message and for which recipient sending the message failed.

Discussion

Note: Do not attempt to re-send the SINMessage received, instead, create a new SINOutgoingMessage and send that.

Declared In

SINMessageClient.h

– message:shouldSendPushNotifications:

Tells the delegate that the receiver’s device can’t be reached directly, and it is required to wake up the receiver’s application with a push notification.

- (void)message:(id<SINMessage>)message shouldSendPushNotifications:(NSArray *)pushPairs

Parameters

message

The message for which pushing is required.

pushPairs

Array of SINPushPair. Each pair identififies a certain device that should be requested to be woken up via Apple Push Notification.

The push data entries are equal to what the receiver’s application passed to the method [SINClient registerPushNotificationData:] method.

See Also

Declared In

SINMessageClient.h