Instance Method


Sent to the delegate when Apple Push Notification service cannot successfully complete the registration process.


optional func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error)



The app object that initiated the remote-notification registration process.


An NSError object that encapsulates information why registration did not succeed. The app can choose to display this information to the user.


After you call the registerForRemoteNotifications() method of the UIApplication object, the app calls this method when there is an error in the registration process.

For more information about how to implement remote notifications in your app, see Local and Remote Notification Programming Guide.

See Also

Handling Local and Remote Notifications

func application(UIApplication, didRegister: UIUserNotificationSettings)

Called to tell the delegate the types of local and remote notifications that can be used to get the user’s attention.

func application(UIApplication, didReceive: UILocalNotification)

Sent to the delegate when a running app receives a local notification.

func application(UIApplication, handleActionWithIdentifier: String?, for: UILocalNotification, completionHandler: () -> Void)

Called when your app has been activated because user selected a custom action from the alert panel of a local notification.

func application(UIApplication, didRegisterForRemoteNotificationsWithDeviceToken: Data)

Tells the delegate that the app successfully registered with Apple Push Notification service (APNs).

func application(UIApplication, handleActionWithIdentifier: String?, forRemoteNotification: [AnyHashable : Any], completionHandler: () -> Void)

Tells the app delegate to perform the custom action specified by a remote notification.

func application(UIApplication, didReceiveRemoteNotification: [AnyHashable : Any])

Called when your app has received a remote notification.