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

# NSFileProviderManager

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

```
class NSFileProviderManager
```

## Topics

### Accessing File Provider data

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

A property that returns the shared file provider manager object.

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

The root URL for all shared documents.

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

A purpose identifier for coordinated reads and writes.

### Translating user-visible URLs

[`-  getUserVisibleURLForItemIdentifier:completionHandler:`](/documentation/FileProvider/NSFileProviderManager/getUserVisibleURL(for:completionHandler:))

Returns the user-visible URL for an item.

[`+  getIdentifierForUserVisibleFileAtURL:completionHandler:`](/documentation/FileProvider/NSFileProviderManager/getIdentifierForUserVisibleFile(at:completionHandler:))

Returns the identifier and domain for a user-visible URL.

### Working with items

[`-  reimportItemsBelowItemWithIdentifier:completionHandler:`](/documentation/FileProvider/NSFileProviderManager/reimportItems(below:completionHandler:))

Tells the system to reimport the item and its content recursively.

[`-  evictItemWithIdentifier:completionHandler:`](/documentation/FileProvider/NSFileProviderManager/evictItem(identifier:completionHandler:))

Asks the system to remove an item from its cache.

[`-  requestDownloadForItemWithIdentifier:requestedRange:completionHandler:`](/documentation/FileProvider/NSFileProviderManager/requestDownloadForItemWithIdentifier:requestedRange:completionHandler:)

[`requestDownloadForItem(withIdentifier:requestedRange:)`](/documentation/FileProvider/NSFileProviderManager/requestDownloadForItem(withIdentifier:requestedRange:))

[`requestDownloadForItem(withIdentifier:requestedRange:completionHandler:)`](/documentation/FileProvider/NSFileProviderManager/requestDownloadForItem(withIdentifier:requestedRange:completionHandler:))

[`-  requestModificationOfFields:forItemWithIdentifier:options:completionHandler:`](/documentation/FileProvider/NSFileProviderManager/requestModification(of:forItemWithIdentifier:options:completionHandler:))

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

Returns an enumerator for all the items the system currently stores on disk.

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

Returns an enumerator for the set of pending items.

### Performing actions

[`+  placeholderURLForURL:`](/documentation/FileProvider/NSFileProviderManager/placeholderURL(for:))

Returns a placeholder URL for a given document URL.

[`+  writePlaceholderAtURL:withMetadata:error:`](/documentation/FileProvider/NSFileProviderManager/writePlaceholder(at:withMetadata:))

Writes a document placeholder with the provided metadata.

[`-  registerURLSessionTask:forItemWithIdentifier:completionHandler:`](/documentation/FileProvider/NSFileProviderManager/register(_:forItemWithIdentifier:completionHandler:))

Registers the URL session task responsible for the specified item.

[`-  signalEnumeratorForContainerItemIdentifier:completionHandler:`](/documentation/FileProvider/NSFileProviderManager/signalEnumerator(for:completionHandler:))

Alerts the system to changes in the specified folder’s content.

[`-  waitForChangesOnItemsBelowItemWithIdentifier:completionHandler:`](/documentation/FileProvider/NSFileProviderManager/waitForChanges(below:completionHandler:))

Requests a notification after the system completes all the specified changes.

[`-  globalProgressForKind:`](/documentation/FileProvider/NSFileProviderManager/globalProgress(for:))

Returns a progress object that tracks either the uploading or downloading of items from the File Provider extension’s remote storage.

### Working with domains

[`+  managerForDomain:`](/documentation/FileProvider/NSFileProviderManager/init(for:))

Returns a newly created file provider manager for the specified domain.

[`+  importDomain:fromDirectoryAtURL:completionHandler:`](/documentation/FileProvider/NSFileProviderManager/import(_:fromDirectoryAt:completionHandler:))

Creates a new domain that takes ownership of on-disk data that your app previously managed without a file provider.

[`+  addDomain:completionHandler:`](/documentation/FileProvider/NSFileProviderManager/add(_:completionHandler:))

Adds a domain to the File Provider extension.

[`+  getDomainsWithCompletionHandler:`](/documentation/FileProvider/NSFileProviderManager/getDomainsWithCompletionHandler(_:))

Returns all of the File Provider extension’s domains.

[`+  removeDomain:completionHandler:`](/documentation/FileProvider/NSFileProviderManager/remove(_:completionHandler:))

Removes a domain from the File Provider extension.

[`+  removeDomain:mode:completionHandler:`](/documentation/FileProvider/NSFileProviderManager/remove(_:mode:completionHandler:))

Removes a domain from the File Provider extension using the specified options.

[`+  removeAllDomainsWithCompletionHandler:`](/documentation/FileProvider/NSFileProviderManager/removeAllDomains(completionHandler:))

Removes all domains from the File Provider extension.

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

A mode indicating how the system handles user data when removing a domain.

[`-  disconnectWithReason:options:completionHandler:`](/documentation/FileProvider/NSFileProviderManager/disconnect(reason:options:completionHandler:))

Disconnects the domain from the extension.

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

Options for disconnecting a domain from the extension.

[`-  reconnectWithCompletionHandler:`](/documentation/FileProvider/NSFileProviderManager/reconnect(completionHandler:))

Reconnects the domain with the extension.

[`-  waitForStabilizationWithCompletionHandler:`](/documentation/FileProvider/NSFileProviderManager/waitForStabilization(completionHandler:))

Requests a notification after the domain stabilizes.

[`-  temporaryDirectoryURLWithError:`](/documentation/FileProvider/NSFileProviderManager/temporaryDirectoryURL())

Returns the URL of a directory that the File Provider extension can use to temporarily store files before passing them to the system.

### Syncing Desktop and Documents folders

[`-  claimKnownFolders:localizedReason:completionHandler:`](/documentation/FileProvider/NSFileProviderManager/claimKnownFolders(_:localizedReason:completionHandler:))

Asks the domain to sync the specified known folders.

[`-  releaseKnownFolders:localizedReason:completionHandler:`](/documentation/FileProvider/NSFileProviderManager/releaseKnownFolders(_:localizedReason:completionHandler:))

Asks the system to stop replicating the specified known folders in the domain.

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

Constants that identify known folders.

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

A class for working with known-folder locations.

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

A protocol that defines the interface for sharing known-folder locations with the system.

### Working with external volumes

[`-  stateDirectoryURLWithError:`](/documentation/FileProvider/NSFileProviderManager/stateDirectoryURL())

Returns a URL for a directory for storing state information for the domain.

[`checkDomainsCanBeStoredOnVolume(at:)`](/documentation/FileProvider/NSFileProviderManager/checkDomainsCanBeStoredOnVolume(at:))

Checks whether the specified URL is eligible for storing a domain.

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

Constants that specify whether a URL is eligible for storing a domain.

[`+  checkDomainsCanBeStored:onVolumeAtURL:unsupportedReason:error:`](/documentation/FileProvider/NSFileProviderManager/checkDomainsCanBeStored:onVolumeAtURL:unsupportedReason:error:)

Check if a URL is eligible for storing a domain.

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

A protocol that defines the interface for handling external volumes.

### Using services

[`-  getServiceWithName:itemIdentifier:completionHandler:`](/documentation/FileProvider/NSFileProviderManager/getService(named:for:completionHandler:))

### Testing

[`-  listAvailableTestingOperationsWithError:`](/documentation/FileProvider/NSFileProviderManager/listAvailableTestingOperations())

Lists all the operations that are ready for scheduling.

[`-  runTestingOperations:error:`](/documentation/FileProvider/NSFileProviderManager/run(_:))

Asks the system to schedule and execute the specified operations.

### Handling errors

[`-  signalErrorResolved:completionHandler:`](/documentation/FileProvider/NSFileProviderManager/signalErrorResolved(_:completionHandler:))

Indicates a resolved error.

### Collecting diagnostic reports

[`-  requestDiagnosticCollectionForItemWithIdentifier:errorReason:completionHandler:`](/documentation/FileProvider/NSFileProviderManager/requestDiagnosticCollection(for:errorReason:completionHandler:))

Requests a diagnostics collection for use when working directly with Apple to improve sync behavior.

## Relationships

### Conforms To

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

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

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

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

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

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

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)