We are looking at the possibility of launching our app through Siri with a locked device. We have the device responding to our App Intent but it is asking to be unlocked first. If the device is locked the intent works perfectly. It just doesn't seem to respect the set intentAuthenticationPolicy. Thank you for you time looking into this.
We have set these var to .alwaysAllowed and open to true.
static var authenticationPolicy: IntentAuthenticationPolicy = .alwaysAllowed static var openAppWhenRun: Bool = true
Here is our full test code:
import AppIntents import SwiftUI // MARK: - App Intents struct OpenAppIntent: AppIntent { static var title: LocalizedStringResource = "Open Main App" static var description: IntentDescription? = .init(stringLiteral: "Opens the App") static var authenticationPolicy: IntentAuthenticationPolicy = .alwaysAllowed static var openAppWhenRun: Bool = true func perform() async throws -> some IntentResult { print("App opened") return .result() } } struct TestAppShortcutProvider: AppShortcutsProvider { static var appShortcuts: [AppShortcut] { AppShortcut( intent: OpenAppIntent(), phrases: [ "Begin \(.applicationName)" ], shortTitle: "Open App", systemImageName: "popcorn.fill" ) } }