Class

NSFileProviderDomain

A File Provider extension's domain.

Declaration

class NSFileProviderDomain : NSObject

Overview

You can use domains to partition a file provider's content. When you use domains, a single file provider can act as if multiple file providers were installed, and users can dynamically switch from one domain to another. You can use domains to represent different accounts or locations.

By default, a File Provider extension has no domain. You can register domains by calling the NSFileProviderManager class's add(_:completion:) method. A new NSFileProviderExtension instance is created for each domain that you register. The NSFileProviderExtension object's domain property indicates which domain the file provider belongs to. Any items returned by that file provider also belong to the domain.

Topics

Creating Domains

Accessing Data

var displayName: String

The name of the domain displayed in the user interface.

var identifier: NSFileProviderDomainIdentifier

The domain's unique identifier.

var pathRelativeToDocumentStorage: String

The path of the domain's subdirectory relative to the file provider's shared container.

Instance Properties

Relationships

Inherits From

Conforms To

See Also

Working with Domains

init?(for: NSFileProviderDomain)

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

class func remove(NSFileProviderDomain, completionHandler: (Error?) -> Void)

Removes a domain from the File Provider extension.

class func removeAllDomains(completionHandler: (Error?) -> Void)

Removes all domains from the File Provider extension.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software