Type Method

requestSiriAuthorization(_:)

Requests authorization to use Siri services.

Declaration

class func requestSiriAuthorization(_ handler: @escaping (INSiriAuthorizationStatus) -> Void)

Parameters

handler

The handler block to execute when the authorization status for your app is determined. This block has no return value and takes the following parameter:

status

The authorization status of your app. For a list of possible values, see INSiriAuthorizationStatus.

Discussion

Call this method from your app to request authorization to integrate with Siri services. The first time you make this request, Siri prompts the user to grant or deny permission for your app to integrate with Siri. Subsequent calls to the method do not prompt the user again.

The block you provide in the handler parameter is executed asynchronously with the results of your authorization request.

See Also

Managing the App’s Authorization

class func siriAuthorizationStatus() -> INSiriAuthorizationStatus

Returns the current authorization status of your app.

enum INSiriAuthorizationStatus

Constants indicating the authorization status of your Intents extension.