UNUserNotificationCenter.RequestAuthorizationAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
.