PushNotification

public class PushNotification : NSObject, NSSecureCoding, Codable

Notification class represents Push Notification message delivered to SDK (application) for registered PushMechanism

Private Properties

  • Message Identifier for Push

    Declaration

    Swift

    public internal(set) var messageId: String { get }
  • MechanismUUID of PushMechanism that Notification belongs to

    Declaration

    Swift

    public internal(set) var mechanismUUID: String { get }
  • Time added for push

    Declaration

    Swift

    public var timeAdded: Date
  • The JSON String containing the custom attributes added to this notification */

    Declaration

    Swift

    public internal(set) var customPayload: String? { get }
  • Message that was received with this notification */

    Declaration

    Swift

    public internal(set) var message: String? { get }
  • The type of push notification **/

    Declaration

    Swift

    public internal(set) var pushType: PushType { get }
  • The numbers used in the push challenge **/

    Declaration

    Swift

    public internal(set) var numbersChallenge: String? { get }
  • The context information to this notification. */

    Declaration

    Swift

    public internal(set) var contextInfo: String? { get }

Public Properties

  • Unique identifier for Notification object associated with PushMechanism

    Declaration

    Swift

    public var identifier: String { get }
  • Boolean property indicating whether or not current Notification is still pending for approval

    Declaration

    Swift

    public var isPending: Bool { get }
  • Boolean property indicating whether or not current Notification is expired

    Declaration

    Swift

    public var isExpired: Bool { get }
  • Boolean property indicating whether or not current Notification is approved

    Declaration

    Swift

    public var isApproved: Bool { get }
  • Boolean property indicating whether or not current Notification is denied

    Declaration

    Swift

    public var isDenied: Bool { get }
  • numbers used for push challenge as int array

    Declaration

    Swift

    public var numbersChallengeArray: [Int]? { get }

NSCoder

  • Declaration

    Swift

    public class var supportsSecureCoding: Bool { get }
  • Declaration

    Swift

    public func encode(with coder: NSCoder)
  • Declaration

    Swift

    public required convenience init?(coder: NSCoder)

Codable

  • Declaration

    Swift

    public func encode(to encoder: Encoder) throws
  • Declaration

    Swift

    public required convenience init(from decoder: Decoder) throws

Accept / Deny

  • Accepts PushNotification authentication

    Declaration

    Swift

    public func accept(onSuccess: @escaping SuccessCallback, onError: @escaping ErrorCallback)

    Parameters

    onSuccess

    successful completion callback

    onError

    failure error callback

  • Accepts the push notification request with the challenge response. Use this method to handle notification of type PushType.challenge

    Declaration

    Swift

    public func accept(challengeResponse: String, onSuccess: @escaping SuccessCallback, onError: @escaping ErrorCallback)

    Parameters

    challengeResponse

    the response for the Push Challenge

    onSuccess

    successful completion callback

    onError

    failure error callback

  • Accepts the push notification request with the Biometric Authentication. Use this method to handle notification of type PushType.biometric

    Declaration

    Swift

    public func accept(title: String, allowDeviceCredentials: Bool, onSuccess: @escaping SuccessCallback, onError: @escaping ErrorCallback)

    Parameters

    title

    the title to be displayed on the prompt.

    allowDeviceCredentials

    if true, accepts device PIN, pattern, or password to process notification.

    onSuccess

    successful completion callback

    onError

    failure error callback

  • Denies PushNotification authentication

    Declaration

    Swift

    public func deny(onSuccess: @escaping SuccessCallback, onError: @escaping ErrorCallback)

    Parameters

    onSuccess

    successful completion callback

    onError

    failure error callback

Public

  • Serializes PushNotification object into JSON String.

    Declaration

    Swift

    public func toJson() -> String?

    Return Value

    JSON String value of PushNotification object