<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: -"
  ],
  "documentType" : "symbol",
  "framework" : "ManagedSettings",
  "identifier" : "/documentation/ManagedSettings/ShieldActionDelegate/handle(action:for:completionHandler:)-9hcqc",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Managed Settings"
    ],
    "preciseIdentifier" : "s:15ManagedSettings20ShieldActionDelegateC6handle6action3for17completionHandleryAA0cD0O_AA5TokenVyAA16ActivityCategoryVGyAA0cD8ResponseOctF"
  },
  "title" : "handle(action:for:completionHandler:)"
}
-->

# handle(action:for:completionHandler:)

Allows the extension to respond to a user action when the system displays a shield over an application or website because of its category.

```
func handle(action: ShieldAction, for category: ActivityCategoryToken, completionHandler: @escaping (ShieldActionResponse) -> Void)
```

## Parameters

`action`

The user’s action.

`category`

The category of the application or website that the shield covers.

`completionHandler`

A closure for your extension to call after you handle the user’s action.

---

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)