<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIDocumentBrowserViewController",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIDocumentBrowserViewController"
  },
  "title" : "UIDocumentBrowserViewController"
}
-->

# UIDocumentBrowserViewController

A view controller for browsing and performing actions on documents that you store locally and in the cloud.

```
@MainActor class UIDocumentBrowserViewController
```

## Overview

With the document browser view controller, users can easily access and view their documents in the cloud. By default, the document browser can access both the system’s local file provider and its iCloud file provider.

![A screenshot of the document browser. The On My iPad location is in a selected state on the left, and several photos and folders appear in the pane on the right.](images/com.apple.uikit/media-2922157@2x.png)

The local file provider grants access to all the documents in the app’s `Documents` directory. Users can also access documents from another app’s `Documents` directory, if that app declares either the <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/UISupportsDocumentBrowser> key, or both the <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/UIFileSharingEnabled> and <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/LSSupportsOpeningDocumentsInPlace> keys in its `Info.plist` file. When the user opens a document from another app’s `Documents` directory, they edit the document in place, and save the changes to the other app’s `Documents` directory.

The iCloud file provider creates a folder for your app in the user’s iCloud Drive. Users can access documents from this folder, or from anywhere in their iCloud Drive. The system automatically handles access to iCloud for you, so you don’t need to enable your app’s iCloud capabilities.

Third-party storage services can also provide access to the documents they manage by implementing a File Provider extension (iOS 11 or later). For more information, see <doc://com.apple.documentation/documentation/FileProvider>.

> Important:
> Don’t assume that the files you access are local. Users can store files in iCloud Drive, or in any cloud storage that provides a current File Provider extension.
> 
> Remember that the system (or other apps) might modify the files that the document browser provides at any time. Therefore, you must coordinate your access to these files using either a ``doc://com.apple.uikit/documentation/UIKit/UIDocument`` subclass, or <doc://com.apple.documentation/documentation/Foundation/NSFilePresenter> and <doc://com.apple.documentation/documentation/Foundation/NSFileCoordinator> objects.

## Topics

### Creating a document browser

[Adding a document browser to your app](/documentation/UIKit/adding-a-document-browser-to-your-app)

Give people access to their local or remote documents from within your app.

[`-  initForOpeningContentTypes:`](/documentation/UIKit/UIDocumentBrowserViewController/init(forOpening:))

Initializes and returns a document browser view controller that can open the specified file types.

### Creating new documents

[`activeDocumentCreationIntent`](/documentation/UIKit/UIDocumentBrowserViewController/activeDocumentCreationIntent)

The current intent that defines how your app creates a document.

### Responding to browser events

[`delegate`](/documentation/UIKit/UIDocumentBrowserViewController/delegate)

The document browser’s delegate.

[`UIDocumentBrowserViewControllerDelegate`](/documentation/UIKit/UIDocumentBrowserViewControllerDelegate)

The protocol you implement to respond as the user interacts with the document browser.

[`-  importDocumentAtURL:nextToDocumentAtURL:mode:completionHandler:`](/documentation/UIKit/UIDocumentBrowserViewController/importDocument(at:nextToDocumentAt:mode:completionHandler:))

Imports a document into the same location as an existing document.

### Configuring a document browser

[`allowsDocumentCreation`](/documentation/UIKit/UIDocumentBrowserViewController/allowsDocumentCreation)

A Boolean value that determines whether the document browser can create new documents.

[`allowsPickingMultipleItems`](/documentation/UIKit/UIDocumentBrowserViewController/allowsPickingMultipleItems)

A Boolean value that determines whether the user can select and open more than one document at a time.

[`-  revealDocumentAtURL:importIfNeeded:completion:`](/documentation/UIKit/UIDocumentBrowserViewController/revealDocument(at:importIfNeeded:completion:))

Reveals, and optionally imports, the document at the provided URL.

[`contentTypesForRecentDocuments`](/documentation/UIKit/UIDocumentBrowserViewController/contentTypesForRecentDocuments)

Content types for browsing recent documents.

### Modifying the browser’s appearance

[`browserUserInterfaceStyle`](/documentation/UIKit/UIDocumentBrowserViewController/browserUserInterfaceStyle-swift.property)

The visual style for the document browser.

[`BrowserUserInterfaceStyle`](/documentation/UIKit/UIDocumentBrowserViewController/BrowserUserInterfaceStyle-swift.enum)

Styles that define the document browser’s appearance.

[`additionalLeadingNavigationBarButtonItems`](/documentation/UIKit/UIDocumentBrowserViewController/additionalLeadingNavigationBarButtonItems)

Additional bar button items that the document browser displays on the leading side of its navigation bar.

[`additionalTrailingNavigationBarButtonItems`](/documentation/UIKit/UIDocumentBrowserViewController/additionalTrailingNavigationBarButtonItems)

Additional bar button items that the document browser displays on the trailing side of its navigation bar.

[`shouldShowFileExtensions`](/documentation/UIKit/UIDocumentBrowserViewController/shouldShowFileExtensions)

A Boolean value that determines whether the browser always shows file extensions.

[`localizedCreateDocumentActionTitle`](/documentation/UIKit/UIDocumentBrowserViewController/localizedCreateDocumentActionTitle)

The title for the Create Document button.

[`defaultDocumentAspectRatio`](/documentation/UIKit/UIDocumentBrowserViewController/defaultDocumentAspectRatio)

The aspect ratio for the Create Document button.

### Adding custom actions

[`customActions`](/documentation/UIKit/UIDocumentBrowserViewController/customActions)

Custom document browser actions.

[`UIDocumentBrowserAction`](/documentation/UIKit/UIDocumentBrowserAction)

A custom action that you can create and add to a document browser’s Edit menu or navigation bar.

### Animating transitions

[`-  transitionControllerForDocumentAtURL:`](/documentation/UIKit/UIDocumentBrowserViewController/transitionController(forDocumentAt:))

Creates a transition controller that provides the standard system-loading and segue animations for the document browser.

[`UIDocumentBrowserTransitionController`](/documentation/UIKit/UIDocumentBrowserTransitionController)

An object that implements the standard loading and transition animations for a document browser.

### Renaming a document

[`-  renameDocumentAtURL:proposedName:completionHandler:`](/documentation/UIKit/UIDocumentBrowserViewController/renameDocument(at:proposedName:completionHandler:))

Renames a document at the specified URL.

### Handling errors

[`UIDocumentBrowserError`](/documentation/UIKit/UIDocumentBrowserError)

A structure that contains information about document browser errors.

[`Code`](/documentation/UIKit/UIDocumentBrowserError/Code)

The error codes for document browser errors.

[`UIDocumentBrowserErrorDomain`](/documentation/UIKit/UIDocumentBrowserErrorDomain)

The error domain for document browser errors.

### Deprecated symbols

[`-  initForOpeningFilesWithContentTypes:`](/documentation/UIKit/UIDocumentBrowserViewController/init(forOpeningFilesWithContentTypes:))

Initializes and returns a document browser view controller that can open the specified file types.

[`recentDocumentsContentTypes`](/documentation/UIKit/UIDocumentBrowserViewController/recentDocumentsContentTypes)

Content types for browsing recent documents.

[`allowedContentTypes`](/documentation/UIKit/UIDocumentBrowserViewController/allowedContentTypes)

The document types that the browser can open.

[`-  transitionControllerForDocumentURL:`](/documentation/UIKit/UIDocumentBrowserViewController/transitionController(forDocumentURL:))

Creates a transition controller that provides the standard system-loading and segue animations for the document browser.

## Relationships

### Conforms To

[`UIAppearanceContainer`](/documentation/UIKit/UIAppearanceContainer)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`CVarArg`](/documentation/Swift/CVarArg)

[`UIStateRestoring`](/documentation/UIKit/UIStateRestoring)

[`NSTouchBarProvider`](/documentation/AppKit/NSTouchBarProvider)

[`Sendable`](/documentation/Swift/Sendable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`UITraitEnvironment`](/documentation/UIKit/UITraitEnvironment)

[`UIActivityItemsConfigurationProviding`](/documentation/UIKit/UIActivityItemsConfigurationProviding)

[`UIContentContainer`](/documentation/UIKit/UIContentContainer)

[`UIFocusEnvironment`](/documentation/UIKit/UIFocusEnvironment)

[`UITraitChangeObservable-67e94`](/documentation/UIKit/UITraitChangeObservable-67e94)

[`UIPasteConfigurationSupporting`](/documentation/UIKit/UIPasteConfigurationSupporting)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Hashable`](/documentation/Swift/Hashable)

[`UIUserActivityRestoring`](/documentation/UIKit/UIUserActivityRestoring)

[`Equatable`](/documentation/Swift/Equatable)

[`UIResponderStandardEditActions`](/documentation/UIKit/UIResponderStandardEditActions)

[`NSExtensionRequestHandling`](/documentation/Foundation/NSExtensionRequestHandling)

### Inherits From

[`UIViewController`](/documentation/UIKit/UIViewController)

---

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)