Düzenle

Aracılığıyla paylaş


WKInterfaceController.HandleRemoteNotificationAction Method

Definition

Called on the Watch App's initial WKInterfaceController when the user reacts to a remote notification.

[Foundation.Export("handleActionWithIdentifier:forRemoteNotification:")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 10, 0, ObjCRuntime.PlatformArchitecture.None, "Use 'UNUserNotificationCenterDelegate' instead.")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.WatchOS, 3, 0, ObjCRuntime.PlatformArchitecture.None, "Use 'UNUserNotificationCenterDelegate' instead.")]
public virtual void HandleRemoteNotificationAction (string identifier, Foundation.NSDictionary remoteNotification);
abstract member HandleRemoteNotificationAction : string * Foundation.NSDictionary -> unit
override this.HandleRemoteNotificationAction : string * Foundation.NSDictionary -> unit

Parameters

identifier
String

The action chosen by the user, or an empty string if the user launched the app without using an action button.

This parameter can be null.

remoteNotification
NSDictionary

The notification.

Attributes

Remarks

This method is called on the WKInterfaceController that is the initial one in the Watch App storyboard, not the WKInterfaceController that displays notifications.

This method is called on the Watch Extension's main thread.

Applies to