UNUserNotificationCenter.RequestAuthorizationAsync Method

Definition

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

public virtual System.Threading.Tasks.Task<Tuple<bool,Foundation.NSError>> RequestAuthorizationAsync (UserNotifications.UNAuthorizationOptions options);
abstract member RequestAuthorizationAsync : UserNotifications.UNAuthorizationOptions -> System.Threading.Tasks.Task<bool * Foundation.NSError>
override this.RequestAuthorizationAsync : UserNotifications.UNAuthorizationOptions -> System.Threading.Tasks.Task<bool * Foundation.NSError>

Parameters

options
UNAuthorizationOptions

The options for the authorization request.

Returns

A task that takes an authorization options object and returns a tuple that contains a boolean that indicates the result of the request and an error.

Remarks

The error in the returned tuple may be null.

Applies to