Adding a Document Browser to Your App

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


Use a document browser view controller as the root of your app's view hierarchy. When a user selects a document, you present its view controller modally from your document browser.

Your app's view hierarchy.

The browser automatically gives users the option to share documents using the Share button or a drag-and-drop action. It also provides a standard interface for browsing and managing documents.

You set the type of documents that the user can select when the browser is first created. You can also set the browser's appearance, modify its behaviors, and add custom actions.



Setting Up a Document Browser App

Add a document browser view controller to your app.

Presenting Selected Documents

Display user-selected documents over your browser view controller.

Enabling Document Sharing

Give users the ability to import and export documents from your app.


Customizing the Browser

Set the browser's appearance, create document thumbnails, and modify the browser's behavior.

Adding Custom Actions and Activities

Add custom document browser actions, activities, and bar items.

See Also

Document Browser

class UIDocumentBrowserViewController

A view controller for browsing and performing actions on documents stored locally and in the cloud.

class UIDocumentBrowserAction

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

class UIDocumentBrowserTransitionController

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

class UIDocumentPickerViewController

An object that lets the user select documents or destinations outside your app’s sandbox.

enum UIDocumentBrowserError.Code

The error codes for errors raised by the document browser.

let UIDocumentBrowserErrorDomain: String

The error domain for errors raised by the document browser.