Initializer

init(fromRemoteNotificationDictionary:)

Creates and returns a new notification object using the specified payload data.

Declaration

convenience init?(fromRemoteNotificationDictionary notificationDictionary: [AnyHashable : Any])

Parameters

notificationDictionary

The payload data for the push notification. This dictionary is the same one passed to your app delegate’s application(_:didReceiveRemoteNotification:fetchCompletionHandler:) method. This parameter must not be nil.

Return Value

A new notification object initialized with the payload data.

Discussion

Use this method to initialize a notification object from a push notification received by your app.

See Also