Upravit

Sdílet prostřednictvím


UNUserNotificationCenter.RequestAuthorization Method

Definition

Requests notifcation authorization with the specified options, and processes the result of the request.

[Foundation.Export("requestAuthorizationWithOptions:completionHandler:")]
public virtual void RequestAuthorization (UserNotifications.UNAuthorizationOptions options, Action<bool,Foundation.NSError> completionHandler);
abstract member RequestAuthorization : UserNotifications.UNAuthorizationOptions * Action<bool, Foundation.NSError> -> unit
override this.RequestAuthorization : UserNotifications.UNAuthorizationOptions * Action<bool, Foundation.NSError> -> unit

Parameters

options
UNAuthorizationOptions

The options for the authorization request.

completionHandler
Action<Boolean,NSError>

A task that takes a bool success value and an error to process.

Attributes

Applies to