<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 11.0.0 -",
    "macOS: 10.15.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FileProviderUI",
  "identifier" : "/documentation/FileProviderUI/FPUIActionExtensionViewController/prepare(forAction:itemIdentifiers:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "File Provider UI"
    ],
    "preciseIdentifier" : "c:objc(cs)FPUIActionExtensionViewController(im)prepareForActionWithIdentifier:itemIdentifiers:"
  },
  "title" : "prepare(forAction:itemIdentifiers:)"
}
-->

# prepare(forAction:itemIdentifiers:)

Performs any necessary setup or configuration for the specified action.

```
func prepare(forAction actionIdentifier: String, itemIdentifiers: [NSFileProviderItemIdentifier])
```

## Parameters

`actionIdentifier`

The identifier for the action performed by the user.

`itemIdentifiers`

The identifiers of the items affected by the action.

## Discussion

Use this method to prepare a user interface for handling the action. At a minimum, you should display feedback about the action.

For more information, see [Adding Actions to the Context Menu](/documentation/FileProviderUI/adding-actions-to-the-context-menu).

---

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)