Contents

Requesting Authorization to Use Siri

Request permission from the user for Siri and Maps to communicate with your app or Intents app extension.

Overview

Siri can’t interact with your app or app extension until the user grants permission. Maps only interacts with your app extension, but as with Siri, only after the user authorizes it to do so. Request authorization from your iOS app, whether you’re handling intents in an app extension or in your app. When the user approves an authorization request from your iOS app, this grants permission for your iOS app, its Intents app extension, and your watchOS app.

Configure Your App Target

First, enable the Siri capability for your iOS app or WatchKit extension for authorization to succeed. For information about how to enable the Siri capability, see Creating an Intents App Extension.

Next, configure your Info.plist file. Include the NSSiriUsageDescription key in your iOS appʼs Info.plist file. The value for this key is a string that describes what information your app shares with SiriKit. For example, a workout app might set the value to the string Workout information will be sent to Siri. This key is a requirement.

Request User Authorization

Call the requestSiriAuthorization(_:) class method of INPreferences at some point during your iOS app’s execution.

Your app’s authorization status is INSiriAuthorizationStatus.notDetermined until the user authorizes or denies access. When your app requests authorization and its status is undetermined, the system prompts the user to authorize your app. The alert includes the usage description string you provided in the NSSiriUsageDescription key of your app’s Info.plist file.

The user can approve or deny your app’s request for authorization, and can change your app’s authorization status later in the Settings app. The system remembers your app’s authorization status so that subsequent calls to the requestSiriAuthorization(_:) method don’t prompt the user again.

See Also

Articles