---
title: "application(_:handlerFor:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiapplicationdelegate/application(_:handlerfor:)"
---

# application(_:handlerFor:)

Asks the delegate for an intent handler capable of handling the specified intent.

## Declaration

```swift
optional func application(_ application: UIApplication, handlerFor intent: INIntent) -> Any?
```

## Parameters

- `application`: The shared app object.
- `intent`: The intent object that represents the request coming from the system.

## Return Value

Return Value An instance of a type capable of handling the specified intent; otherwise, nil if your app doesn’t handle the intent. Return an instance of a type that conforms to the handling intents protocol for the same type as the provided intent.

## Discussion

Discussion important: The system only invokes this method in apps that support multiple scenes. For more information, see Specifying the scenes your app supports. Siri invokes this method on the main queue when it wants to process one of your app’s supported intents. To indicate the intents that your app supports, populate the INIntentsSupported array in your app target’s Info.plist file. In your delegate’s implementation of this method, check the intent parameter’s type and return a custom object that adopts the corresponding handling protocol. For example, if intent is an instance of INPlayMediaIntent, return an object that adopts INPlayMediaIntentHandling. Only use the provided intent to determine the handler to return; don’t use it to initialize the handler and don’t store a reference to it. SiriKit updates the intent throughout the request to incorporate information the requester provides. For more information, see Dispatching intents to handlers. For information about handling intents, see Resolving and Handling Intents.
