Contents

UIDocumentBrowserViewController

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

Declaration

@MainActor class UIDocumentBrowserViewController

Mentioned in

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.

[Image]

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.

Topics

Creating a document browser

Creating new documents

Responding to browser events

Configuring a document browser

Modifying the browser’s appearance

Adding custom actions

Animating transitions

Renaming a document

Handling errors

Deprecated symbols

Initializers

See Also

Documents and directories