SINNotificationResult Protocol Reference

Conforms to NSObject
Declared in SINNotificationResult.h

Overview

SINNotificationResult is used to indicate the result of [SINClient relayRemotePushNotification:] .

When a user acts on a push notification, the Sinch-specific payload which is embedded in the notification may represent either an incoming call, or an incoming instant- message. SINNotificationResult is used to give information about what the notification payload represented, and can thus be used by the application to take appropriate actions.

See SINCallNotificationResult for additional details.

Example use:

id result = [self.client relayRemotePushNotification:payload];

if ([result isCall] && [[result callResult] isTimedOut]) { NSString* remoteUserId = [[result callResult] remoteUserId]; // present UIAlert indicating user has a missed call. }

It can be especially useful for scenarios which will not result in the SINClientDelegate receiving any callback for an incoming call as a result of calling the methods mentioned above. One such scenario is when a user have been attempted to be reached, but not acted on the notification directly. In that case, the notification result object can indicate that the notification is too old (isTimedOut), and also contains the remoteUserId which can be used for display purposes.

  isValid required method

Indicates whether the notification is valid or not.

@property (nonatomic, readonly, assign) BOOL isValid

Declared In

SINNotificationResult.h

– isCall required method

Indicates whether the notification is call related

- (BOOL)isCall

Declared In

SINNotificationResult.h

– callResult required method

If the notification is call related (isCall is true), callResult contains the notification result

- (id<SINCallNotificationResult>)callResult

Declared In

SINNotificationResult.h