Contents

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 implement push notifications in your application, see Local and Remote Notification Programming Guide.

See Also

Handling Push Notifications