---
title: FPUIActionExtensionViewController
framework: fileproviderui
role: symbol
role_heading: Class
path: fileproviderui/fpuiactionextensionviewcontroller
---

# FPUIActionExtensionViewController

The custom user interface used to perform a selected action.

## Declaration

```swift
class FPUIActionExtensionViewController
```

## Mentioned in

Adding Actions to the Context Menu

## Overview

Overview Subclass this view controller to provide the user interface for your actions. No matter how many actions you define, your File Provider UI extension has only one FPUIActionExtensionViewController subclass. When the user selects one of your actions, the system instantiates a copy of your subclass, calls its prepare(forAction:itemIdentifiers:) method, and presents it to the user. Your subclass must do the following: Override the prepare(forAction:itemIdentifiers:) method to check the action identifiers and present an appropriate user interface for the selected actions. Provide some sort of feedback, even if the action doesn’t require interaction with the user. For example, present a view that quickly fades out and automatically completes the action. Call the extensionContext object’s cancelRequest(withError:) or completeRequest() method when the action is finished to complete the action.

## Topics

### Working with Actions

- [prepare(forAction:itemIdentifiers:)](fileproviderui/fpuiactionextensionviewcontroller/prepare(foraction:itemidentifiers:).md)
- [prepare(forError:)](fileproviderui/fpuiactionextensionviewcontroller/prepare(forerror:).md)
- [extensionContext](fileproviderui/fpuiactionextensionviewcontroller/extensioncontext.md)
- [FPUIActionExtensionContext](fileproviderui/fpuiactionextensioncontext.md)

## Relationships

### Inherits From

- [NSViewController](appkit/nsviewcontroller.md)
- [UIViewController](uikit/uiviewcontroller.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSEditor](appkit/nseditor.md)
- [NSExtensionRequestHandling](foundation/nsextensionrequesthandling.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSeguePerforming](appkit/nssegueperforming.md)
- [NSStandardKeyBindingResponding](appkit/nsstandardkeybindingresponding.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.md)
- [NSUserActivityRestoring](appkit/nsuseractivityrestoring.md)
- [NSUserInterfaceItemIdentification](appkit/nsuserinterfaceitemidentification.md)
- [UIActivityItemsConfigurationProviding](uikit/uiactivityitemsconfigurationproviding.md)
- [UIAppearanceContainer](uikit/uiappearancecontainer.md)
- [UIContentContainer](uikit/uicontentcontainer.md)
- [UIFocusEnvironment](uikit/uifocusenvironment.md)
- [UIPasteConfigurationSupporting](uikit/uipasteconfigurationsupporting.md)
- [UIResponderStandardEditActions](uikit/uiresponderstandardeditactions.md)
- [UIStateRestoring](uikit/uistaterestoring.md)
- [UITraitChangeObservable](uikit/uitraitchangeobservable-67e94.md)
- [UITraitEnvironment](uikit/uitraitenvironment.md)
- [UIUserActivityRestoring](uikit/uiuseractivityrestoring.md)

## See Also

### Document Browser Customization

- [Adding Actions to the Context Menu](fileproviderui/adding-actions-to-the-context-menu.md)
