Instance Property


The document types that the browser can open.


var allowedContentTypes: [String] { get }


This property contains an array of uniform type identifiers (UTIs). The document browser can open only documents of the types specified by these UTIs.

The list of UTIs is set when the document browser is first created. This list cannot be changed.If you programmatically create a document browser, this list is set to the value passed to the init(forOpeningFilesWithContentTypes:) method's allowedContentTypes parameter.

If you add a document browser to your project using a storyboard or Interface Builder, this property is calculated based on the the CFBundleDocumentTypes key in your app's Info.plist file. For details, see Set the Supported Document Types.

For more about UTIs, see Uniform Type Identifiers Reference.

See Also

Configuring a Document Browser

var allowsDocumentCreation: Bool

A Boolean value that determines whether the document browser can create new documents.

var allowsPickingMultipleItems: Bool

A Boolean value that determines whether the user can select and open more than one document at a time.

func revealDocument(at: URL, importIfNeeded: Bool, completion: ((URL?, Error?) -> Void)?)

Reveals (and optionally imports) the document at the provided URL.