---
title: UIDocumentBrowserViewController
framework: uikit
role: symbol
role_heading: Class
path: uikit/uidocumentbrowserviewcontroller
---

# UIDocumentBrowserViewController

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

## Declaration

```swift
@MainActor class UIDocumentBrowserViewController
```

## Mentioned in

Providing access to directories Customizing the document browser

## Overview

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.

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 UISupportsDocumentBrowser key, or both the UIFileSharingEnabled and 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 File Provider. 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 UIDocument subclass, or NSFilePresenter and NSFileCoordinator objects.

## Topics

### Creating a document browser

- [Adding a document browser to your app](uikit/adding-a-document-browser-to-your-app.md)
- [init(forOpening:)](uikit/uidocumentbrowserviewcontroller/init(foropening:).md)

### Creating new documents

- [activeDocumentCreationIntent](uikit/uidocumentbrowserviewcontroller/activedocumentcreationintent.md)

### Responding to browser events

- [delegate](uikit/uidocumentbrowserviewcontroller/delegate.md)
- [UIDocumentBrowserViewControllerDelegate](uikit/uidocumentbrowserviewcontrollerdelegate.md)
- [importDocument(at:nextToDocumentAt:mode:completionHandler:)](uikit/uidocumentbrowserviewcontroller/importdocument(at:nexttodocumentat:mode:completionhandler:).md)

### Configuring a document browser

- [allowsDocumentCreation](uikit/uidocumentbrowserviewcontroller/allowsdocumentcreation.md)
- [allowsPickingMultipleItems](uikit/uidocumentbrowserviewcontroller/allowspickingmultipleitems.md)
- [revealDocument(at:importIfNeeded:completion:)](uikit/uidocumentbrowserviewcontroller/revealdocument(at:importifneeded:completion:).md)
- [contentTypesForRecentDocuments](uikit/uidocumentbrowserviewcontroller/contenttypesforrecentdocuments.md)

### Modifying the browser’s appearance

- [browserUserInterfaceStyle](uikit/uidocumentbrowserviewcontroller/browseruserinterfacestyle-swift.property.md)
- [UIDocumentBrowserViewController.BrowserUserInterfaceStyle](uikit/uidocumentbrowserviewcontroller/browseruserinterfacestyle-swift.enum.md)
- [additionalLeadingNavigationBarButtonItems](uikit/uidocumentbrowserviewcontroller/additionalleadingnavigationbarbuttonitems.md)
- [additionalTrailingNavigationBarButtonItems](uikit/uidocumentbrowserviewcontroller/additionaltrailingnavigationbarbuttonitems.md)
- [shouldShowFileExtensions](uikit/uidocumentbrowserviewcontroller/shouldshowfileextensions.md)
- [localizedCreateDocumentActionTitle](uikit/uidocumentbrowserviewcontroller/localizedcreatedocumentactiontitle.md)
- [defaultDocumentAspectRatio](uikit/uidocumentbrowserviewcontroller/defaultdocumentaspectratio.md)

### Adding custom actions

- [customActions](uikit/uidocumentbrowserviewcontroller/customactions.md)
- [UIDocumentBrowserAction](uikit/uidocumentbrowseraction.md)

### Animating transitions

- [transitionController(forDocumentAt:)](uikit/uidocumentbrowserviewcontroller/transitioncontroller(fordocumentat:).md)
- [UIDocumentBrowserTransitionController](uikit/uidocumentbrowsertransitioncontroller.md)

### Renaming a document

- [renameDocument(at:proposedName:completionHandler:)](uikit/uidocumentbrowserviewcontroller/renamedocument(at:proposedname:completionhandler:).md)

### Handling errors

- [UIDocumentBrowserError](uikit/uidocumentbrowsererror.md)
- [UIDocumentBrowserError.Code](uikit/uidocumentbrowsererror/code.md)
- [UIDocumentBrowserErrorDomain](uikit/uidocumentbrowsererrordomain.md)

### Deprecated symbols

- [init(forOpeningFilesWithContentTypes:)](uikit/uidocumentbrowserviewcontroller/init(foropeningfileswithcontenttypes:).md)
- [recentDocumentsContentTypes](uikit/uidocumentbrowserviewcontroller/recentdocumentscontenttypes.md)
- [allowedContentTypes](uikit/uidocumentbrowserviewcontroller/allowedcontenttypes.md)
- [transitionController(forDocumentURL:)](uikit/uidocumentbrowserviewcontroller/transitioncontroller(fordocumenturl:).md)

### Initializers

- [init(forOpeningContentTypes:)](uikit/uidocumentbrowserviewcontroller/init(foropeningcontenttypes:).md)

## Relationships

### Inherits From

- [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)
- [NSExtensionRequestHandling](foundation/nsextensionrequesthandling.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.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

### Documents and directories

- [Customizing a document-based app’s launch experience](uikit/customizing-a-document-based-app-s-launch-experience.md)
- [Adding a document browser to your app](uikit/adding-a-document-browser-to-your-app.md)
- [Providing access to directories](uikit/providing-access-to-directories.md)
- [Building an app with a document browser](uikit/building-an-app-with-a-document-browser.md)
- [Building a document browser app for custom file formats](uikit/building-a-document-browser-app-for-custom-file-formats.md)
- [UIDocumentViewController](uikit/uidocumentviewcontroller.md)
- [UIDocumentPickerViewController](uikit/uidocumentpickerviewcontroller.md)
- [UIDocumentInteractionController](uikit/uidocumentinteractioncontroller.md)
