iOS 12 - LocalAuthentication broken in Intents Extension `handle()` method

Originator:andrew
Number:rdar://43367798 Date Originated:August 16 2018, 2:26 AM
Status:open Resolved:
Product:iOS + SDK Product Version:iOS 12
Classification: Reproducible:Always
 
Area:
SiriKit

Summary:
Always reproducible on iOS hardware. Only sometimes reproducible on iOS simulator if another app was recently deleted that could handle the same intent.

Use of LocalAuthentication via LAContext is broken when used inside the handle method of an Intents Extension intent handler.
The LocalAuthentication example from this wwdc video, https://developer.apple.com/videos/play/wwdc2017/228/ , will not work in iOS 12 beta 5 or 6 running on the two hardware devices I've tested on (iPhone 5s and iPhone X).

I've created a sample project that showcases this.

Steps to Reproduce:

Either launch the sample app scheme on a physical device running the latest iOS 12 beta, or launch the intents extension scheme on a physical device running the latest iOS 12 beta.

If the app is installed on a device and Siri is setup, you can simply say "Hey Siri, lock my car", and then it will prompt you for consent, and then the error occurs.


Expected Results:
Running this same code on a device running iOS 11 works. I'm trying to ship code using Siri shortcuts in time for the iOS 12 release and this is killing us.

Actual Results:
LocalAuthentication fails with the error:
Error Domain=com.apple.LocalAuthentication Code=-1004 "User interaction is required." UserInfo={NSLocalizedDescription=User interaction is required.}

Also, weird bug occurs on the simulator when LocalAuthentication "works" - the entire screen goes black but the status bar still is shown. Pressing Home brings the user back to the Siri user interface.

Version/Build:
iOS 12 beta 6 (16A5345f)

Configuration:
iPhone X simulator from Xcode 10 Beta 6: Default simulator setup with FaceID "enrolled" checked.
iPhone 5s: Siri is enabled and hey siri is configured, touchID is enabled with one fingerprint enrolled.
iPhone X: Siri is enabled and hey siri is configured. FaceID is enabled with a face enrolled.

Comments


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!