INPreferences.siriAuthorizationStatus cannot be modified after it is initially set

Originator:JAltreuter
Number:rdar://45024092 Date Originated:10/4/2018
Status:Open Resolved:
Product:iOS + SDK | SiriKit Product Version:iOS 12
Classification:Bug Reproducible:Always
 
Summary:

When an app is initially installed on a standard iPhone, the value of INPreferences.siriAuthorizationStatus is .notDetermined, as expected.  When INPreferences.requestSiriAuthorization() is called, the user is prompted to grant or deny authorization, and siriAuthorizationStatus is set to .authorized or .denied accordingly.  All subsequent calls to requestSiriAuthorization are ignored.  All of this behavior is expected.

The documentation for INPreferences.siriAuthorizationStatus states that the status can be changed in the Settings app, but in fact its value does not correspond to any setting in the Settings app.  Therefore once the value is set based on the user's choice the first time requestSiriAuthorization() is called, it can never be changed.

Also, Siri shortcuts can be created and used regardless of the current value of siriAuthorizationStatus.

Steps to Reproduce:

Scenario A:
1. Install your application on a device that it has never been installed on
2. Donate some intents using INInteraction.donate()
3. Go to Settings > Siri & Search > MyApp > Shortcuts
4. Create a shortcut

Scenario B:
1. Install your application on a device that it has never been installed on
2. Donate some intents using INInteraction.donate()
3. Trigger a call to INPreferences.requestSiriAuthorization()
4. Deny the request
5. Go to Settings > MyApp > Siri & Search


Expected Results:
Scenario A:
It should not be possible to create a shortcut

Scenario B:
Some setting should exist that's switched off.  Switching it on and going back to MyApp should result in the value of INPreferences.siriAuthorizationStatus being .authorized

Actual Results:
Scenario A:
Shortcuts can be created and used in Siri

Scenario B:
All settings shown are switched on.  No configuration of the toggles will result in the value of INPreferences.siriAuthorizationStatus being .authorized

Version/Build:
iOS 12.0, Swift 4.2

Configuration:
Seen on an iPhone X device and iPhone 8 simulator.

Comments

As per API the result of the call to https://developer.apple.com/documentation/sirikit/intent_handling_infrastructure/requesting_authorization_to_use_siri should be recalled and block execution when it's "denied" but it seems to be ignored.

Cautious developers would check for the value of the "INSiriAuthorizationStatus" and block feature access but that would instead lead to a deadlock as no toggles on Settings-> App -> Siri would trigger a user prompt for authorisation (as suggested by docs)

No documented changes on API I could find on the iOS releases notes > 11.0

By jaime.agudo.lopez at May 24, 2024, 3:32 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!