AppIntents do not work with Shortcuts from lockscreen

I have created an Intent with openAppWhenRun = true, defined a String? parameter and tried to get a value for it through $myParameter.requestDisambiguation in perform method Then I created Shortcut for my Intent

When I call my Shortcut from lockscreen this happens:

  1. iPhone asks to unlock
  2. I unlock it
  3. Application opens
  4. Nothing happens

In debugger I can see that $myParameter.requestDisambiguation executes but nothing happens then. It seems that my application is awaiting $myParameter.requestDisambiguation forever

When running shortcut with iPhone being already unlocked, everything works fine. Application opens and I can see disambiguation dialog.

If I remove $myParameter.requestDisambiguation call, everything works fine as well

What am I doing wrong? Or maybe it is a bug and there is any workaround?

My code snippet:

struct SampleIntent: AppIntent {
 static var openAppWhenRun: Bool = true
 static let title: LocalizedStringResource = "Start sample intent"

 @Parameter(title: "Test", description: "Test")
 var test: String?

 func perform() async throws -> some IntentResult {
  let choice = try? await $test.requestDisambiguation(among: ["One", "Two", "Three"])
  print("Perform method called")
  return .result(dialog: "Done")
 }
}

struct SampleShortcuts: AppShortcutsProvider {
 static var appShortcuts: [AppShortcut] = [
  AppShortcut(
   intent: SampleIntent(),
   phrases: [
    "Hello \(.applicationName)"
   ]
  )
 ]
}

Did you ever work this problem out? What's the solution?

AppIntents do not work with Shortcuts from lockscreen
 
 
Q