Requests permission to save and read the data types specified by an extension.
- iOS 9.0+
- Mac Catalyst 13.0+
A block that is called after the user finishes responding to the request. This block is passed the following parameters:
A Boolean value that indicates whether the user responded to the prompt (if any). This value does not indicate whether permission was actually granted. This parameter is
falseif the user canceled the prompt without selecting permissions; otherwise,
An error object. If an error occurred, this object contains information about the error; otherwise, it is set to
The host app must implement the application delegate’s
application method. This delegate method is called after an app extension calls
request. The host app is then responsible for calling
handle. This method prompts the user to authorize both the app and its extensions for the types that the extension requested.
The system performs this request asynchronously. After the user has finished responding, this method calls its completion block on a background queue. If the user has already chosen to grant or prohibit access to all of the types specified, the completion is called without prompting the user.