Instance Method

application(_:didFailToRegisterForRemoteNotificationsWithError:)

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

Declaration

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

Parameters

application

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

error

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

Discussion

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.