Instance Method

didFailToRegisterForRemoteNotificationsWithError:

Tells the delegate that Apple Push Notification service (APNs) cannot successfully complete the registration process.

Declaration

- (void)didFailToRegisterForRemoteNotificationsWithError:(NSError *)error;

Parameters

error

An error object that contains information about why the registration failed. The app can choose to display this information to the user.

Discussion

WatchKit calls this method if it was unable to register your app with APNs or if your app is not properly configured for remote notifications. For example, WatchKit might call this method if you didn’t enable your WatchKit extension’s Push Notification capability. For more information about how to set up and send remote notifications in your app, see Setting Up a Remote Notification Server and Registering Your App with APNs.

In your implementation, you can check the error type, and try to register again later.

See Also

Managing Remote Notifications

- didRegisterForRemoteNotificationsWithDeviceToken:

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

- didReceiveRemoteNotification:fetchCompletionHandler:

Tells the delegate that a background notification has arrived.

WKBackgroundFetchResult

The result of an attempt to download the content associated with a remote notification.