SinchNotificationResult
public struct SinchNotificationResult
SinchNotificationResult is used to indicate the result of SinchClient.relayPushNotification(withUserInfo:) and
queryPushNotificationPayload(_:).
Example use:
let result = self.client.relayPushNotification(withUserInfo: payload)
if (result.isCall && result.callResult.isTimedOut) {
let remoteUserId = result.callResult.remoteUserId;
// Present UI indicating user missed the call.
}
It can be especially useful for scenarios which will not result in
the SinchClientDelegate 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.
See also
SinchCallNotificationResult
-
Indicates whether the notification is valid or not
Declaration
Swift
public let isValid: Bool -
Indicates whether the notification is call related
Declaration
Swift
public let isCall: Bool -
If the notification is call related (isCall is true), callResult contains the notification result
Declaration
Swift
public let callResult: SinchCallNotificationResult