<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSApplicationDelegate/application(_:didFailToRegisterForRemoteNotificationsWithError:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSApplicationDelegate(im)application:didFailToRegisterForRemoteNotificationsWithError:"
  },
  "title" : "application(_:didFailToRegisterForRemoteNotificationsWithError:)"
}
-->

# application(_:didFailToRegisterForRemoteNotificationsWithError:)

Tells the delegate that the app was unable to register for Apple Push Services.

```
@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:)`](/documentation/AppKit/NSApplication/registerForRemoteNotifications(matching:)) method of [`NSApplication`](/documentation/AppKit/NSApplication) is invoked and there is an error in the registration process.

For more information about how to register with APNs, see <doc://com.apple.documentation/documentation/UserNotifications/registering-your-app-with-apns>.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)