Intent Handler not called

Hi,

I have an intent in my app that does not allow background execution. When the user taps a notification, runs a shortcut, etc. I want it to open my app to perform the action.

I have activated "Display Donations on Lock Screen" and when I tap the notification my app is opening, but the intent handler in AppDelegate is never called. Any ideas why?

func application(_ application: UIApplication, handlerFor intent: INIntent) -> Any? {

        switch intent {

        case is OpenPassIntent:

            return OpenPassIntentHandler()



        default:

            return nil

        }

 }

I'm running into the same issue and I'm wondering if it has something to do with the target OS of my app. I'm currently targeting iOS 12. How about you?

I think I've found the answer here. It looks like we need to:

Support multiple windows using the UIScene lifecycleList the supported intents in your Info.plistSupport the application delegate handler call (which we already did)

I'll give it a shot and let you know how it goes

I believe the issue is probably that you are missing some of the requirements for in-app intent handling. According to this WWDC session, these are the requirements:

  • Add support for multiple windows using the UIScene lifecycle
  • List the supported intents in your Info.plist
  • Support the application delegate intent handler call (which you have already done)
Intent Handler not called
 
 
Q