Instance Method

didReceiveLocalNotification:

Tells the delegate that a local notification was triggered.

Declaration

- (void)didReceiveLocalNotification:(UILocalNotification *)notification;

Parameters

notification

The local notification object corresponding to the event that was triggered.

Discussion

If a local notification arrives while your app is active, WatchKit calls this method to deliver the notification payload. Use this method to respond to the notification. For example, you might use this method to update your app’s interface or display a message to the user.

WatchKit may call this method multiple times. If a new local notification with the same category arrives while your app is active, WatchKit calls the method again with the new payload.

See Also

Deprecated Methods

- didReceiveRemoteNotification:

Tells the delegate that a remote notification arrived.

Deprecated
- handleActionWithIdentifier:forRemoteNotification:

Delivers a remote notification payload and a user-selected action to the app.

Deprecated
- handleActionWithIdentifier:forRemoteNotification:withResponseInfo:

Delivers a remote notification payload and user response information to the app.

Deprecated
- handleActionWithIdentifier:forLocalNotification:

Delivers a local notification payload and a user-selected action to the app.

Deprecated
- handleActionWithIdentifier:forLocalNotification:withResponseInfo:

Delivers a local notification payload and user response information to the app.

Deprecated