WKInterfaceController.HandleRemoteNotificationAction 方法

定义

当用户对远程通知做出反应时,在监视应用的初始 WKInterfaceController 上调用。

[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

参数

identifier
String

用户选择的操作;如果用户在不使用操作按钮的情况下启动应用,则为空字符串。

此参数可以为 null

remoteNotification
NSDictionary

通知。

属性

注解

此方法是在 WKInterfaceController 监视应用情节提要中初始的 上调用的,而不是 WKInterfaceController 显示通知的 。

此方法在监视扩展的主线程上调用。

适用于