UIApplicationDelegate.DidReceiveRemoteNotification 方法

定义

远程后台通知支持:当应用程序收到远程通知时,由操作系统调用。

[Foundation.Export("application:didReceiveRemoteNotification:fetchCompletionHandler:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void DidReceiveRemoteNotification (UIKit.UIApplication application, Foundation.NSDictionary userInfo, Action<UIKit.UIBackgroundFetchResult> completionHandler);
abstract member DidReceiveRemoteNotification : UIKit.UIApplication * Foundation.NSDictionary * Action<UIKit.UIBackgroundFetchResult> -> unit
override this.DidReceiveRemoteNotification : UIKit.UIApplication * Foundation.NSDictionary * Action<UIKit.UIBackgroundFetchResult> -> unit

参数

application
UIApplication

UIApplication 的句柄。

userInfo
NSDictionary
completionHandler
Action<UIBackgroundFetchResult>

调用以通知操作系统后台提取操作结果的回调。

属性

注解

此方法是 iOS 7.0 新远程通知支持的一部分。 如果权利列出设置了“远程通知”后台操作,并且你收到远程通知,则调用此方法。

完成后,必须通过调用提供的回调来通知操作系统方法的结果。

重要说明:在此方法完成之前未能使用结果代码调用提供的回调方法将导致应用程序终止。

适用于