application(_:didFailToRegisterForRemoteNotificationsWithError:)
Tells the delegate that the app was unable to register for Apple Push Services.
Declaration
@MainActor optional func application(_ application: NSApplication, didFailToRegisterForRemoteNotificationsWithError error: any Error)Parameters
- application:
The application that initiated the remote-notification registration process.
- error:
An NSError object that encapsulates information why registration did not succeed. The application can display this information to the user.
Discussion
The delegate receives this message after the registerForRemoteNotifications(matching:) method of NSApplication is invoked and there is an error in the registration process.
For more information about how to register with APNs, see Registering your app with APNs.