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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software