<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "IdentityLookup",
  "identifier" : "/documentation/IdentityLookup/ILMessageFilterQueryHandling/handle(_:context:completion:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SMS and Call Reporting"
    ],
    "preciseIdentifier" : "c:objc(pl)ILMessageFilterQueryHandling(im)handleQueryRequest:context:completion:"
  },
  "title" : "handle(_:context:completion:)"
}
-->

# handle(_:context:completion:)

Evaluates a query request and tells the system how to handle the message represented in the request.

```
func handle(_ queryRequest: ILMessageFilterQueryRequest, context: ILMessageFilterExtensionContext, completion: @escaping @Sendable (ILMessageFilterQueryResponse) -> Void)
```

```
func handle(_ queryRequest: ILMessageFilterQueryRequest, context: ILMessageFilterExtensionContext) async -> ILMessageFilterQueryResponse
```

## Parameters

`queryRequest`

A query request that describes a received message.

`context`

The app extension context that defines APIs to defer the request to a server, if necessary.

`completion`

A completion block used to return a response that describes how to handle the message. You can invoke this block asynchronously.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)