<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "FileProvider",
  "identifier" : "/documentation/FileProvider",
  "metadataVersion" : "0.1.0",
  "role" : "Framework",
  "symbol" : {
    "kind" : "Framework",
    "modules" : [
      "File Provider"
    ],
    "preciseIdentifier" : "FileProvider"
  },
  "title" : "File Provider"
}
-->

# File Provider

An extension other apps use to access files and folders managed by your app and synced with a remote storage.

## Overview

If your app focuses on providing and syncing user documents from remote storage, you can implement a File Provider extension to give users access to those documents when they’re using other apps. If you just need to share local documents, see [`Share files locally`](/documentation/FileProvider#Share-files-locally) below.

![A diagram that depicts the interaction between an app and your server facilitated by a File Provider extension. The app communicates with the document browser, which requests data to the File Provider extension. The File Provider extension syncs updates with the remote server.](images/com.apple.fileprovider/media-4032695~dark@2x.png)

The framework has two different starting points for building your File Provider extension.

- term ``doc://com.apple.fileprovider/documentation/FileProvider/NSFileProviderReplicatedExtension``: The system manages the content accessed through the File Provider extension. Available in macOS 11+ and iOS 16+.
- term ``doc://com.apple.fileprovider/documentation/FileProvider/NSFileProviderExtension``: The extension hosts and manages the files accessed through the File Provider extension. Available in iOS 11+.

The replicated extension takes responsibility for monitoring and managing the local copies of your documents. The file provider focuses on syncing data between the local copy and the remote storage—uploading any local changes and downloading any remote changes. For more information, see [Replicated File Provider extension](/documentation/FileProvider/replicated-file-provider-extension).

The nonreplicated extension manages a local copy of the extension’s content, including creating and managing placeholders for remote files. It also syncs the content with your remote storage. For more information, see [Nonreplicated File Provider extension](/documentation/FileProvider/nonreplicated-file-provider-extension).

### Share files locally

You don’t need a File Provider extension to allow access to documents that your app stores locally.

In iOS, to give other apps access to the files in your `Documents` directory, set the following keys in your app’s Info tab or its `Info.plist` file. For document browser-based apps, set the [UISupportsDocumentBrowser](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW37) key. For all other apps, set both the [UIFileSharingEnabled](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW20) and [LSSupportsOpeningDocumentsInPlace](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/plist/info/LSSupportsOpeningDocumentsInPlace) keys.

After you set these keys, other apps can open and edit the contents of your `Documents` directory in place. Your files also appear in both the Files app and the document browser. For more information, see the <doc://com.apple.documentation/documentation/UIKit/UIDocumentBrowserViewController> class.

## Topics

### Essentials

  <doc://com.apple.documentation/documentation/Updates/FileProvider>

### Extension types

[Replicated File Provider extension](/documentation/FileProvider/replicated-file-provider-extension)

Build a File Provider extension that syncs the local copies of your files with your remote storage.

[Nonreplicated File Provider extension](/documentation/FileProvider/nonreplicated-file-provider-extension)

Build a File Provider extension that hosts and manages the user’s local files.

### Extension management

[`NSFileProviderManager`](/documentation/FileProvider/NSFileProviderManager)

A manager object that you use to communicate with the file provider from either your app or your File Provider extension.

### Provided items

[`NSFileProviderItem`](/documentation/FileProvider/NSFileProviderItem-swift.typealias)

An item the File Provider extension manages.

[`NSFileProviderItemProtocol`](/documentation/FileProvider/NSFileProviderItemProtocol)

A protocol that defines the properties of an item managed by the File Provider extension.

[`NSFileProviderItemIdentifier`](/documentation/FileProvider/NSFileProviderItemIdentifier)

A unique identifier for an item managed by the File Provider extension.

[`NSFileProviderItemCapabilities`](/documentation/FileProvider/NSFileProviderItemCapabilities)

An item’s capabilities, which define the actions that the user can perform in the document browser.

[`NSFileProviderTypeAndCreator`](/documentation/FileProvider/NSFileProviderTypeAndCreator)

A structure that contains the file type and file creator codes for an item.

### Cloud search

[`NSFileProviderSearching`](/documentation/FileProvider/NSFileProviderSearching)

A protocol you implement to support searching in your file provider.

### Domains

[`NSFileProviderDomain`](/documentation/FileProvider/NSFileProviderDomain)

A File Provider extension’s domain.

### Errors

[`NSFileProviderError`](/documentation/FileProvider/NSFileProviderError)

A structure that contains information about File Provider extension errors.

[`NSFileProviderError.Code`](/documentation/FileProvider/NSFileProviderError/Code)

The error codes for the File Provider extension.

[`NSFileProviderErrorDomain`](/documentation/FileProvider/NSFileProviderErrorDomain)

The error domain for the File Provider extension.

[`NSFileProviderErrorItemKey`](/documentation/FileProvider/NSFileProviderErrorItemKey)

The key for accessing information about sync-related errors.

[`NSFileProviderErrorNonExistentItemIdentifierKey`](/documentation/FileProvider/NSFileProviderErrorNonExistentItemIdentifierKey)

The key for accessing the specified item’s identifier when the item doesn’t exist.

[`NSFileProviderErrorCollidingItemKey`](/documentation/FileProvider/NSFileProviderErrorCollidingItemKey)

The key for accessing the existing item from a filename collision error’s user info dictionary.

### Data export

[Exporting file provider metrics data](/documentation/FileProvider/exporting-file-provider-metrics-data)

Download and analyze usage, consistency, and error data.

### Global variables and macros

[Global variables and macros](/documentation/FileProvider/global-variables-and-macros)



---

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)
