UIApplicationDelegate.DidReceiveRemoteNotification 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
遠端背景通知支援:當應用程式收到遠端通知時,由作業系統叫用。
[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 新遠端通知支援的一部分。 如果您的權利清單已設定「遠端通知」背景作業,而且您會收到遠端通知,就會叫用這個方法。
完成時,您必須叫用提供的回呼,以通知作業系統方法的結果。
重要事項:在此方法完成之前,無法以結果碼呼叫提供的回呼方法,會導致您的應用程式終止。