Instance Property


The initial directory displayed by the document picker.


var directoryURL: URL? { get set }


Set this property to specify the starting directory for the document picker. This property defaults to nil. If you specify a value, the document picker tries to start at the specified directory. Otherwise, it starts with the last directory chosen by the user.

directoryURL only returns a value when you explicitly set it. For example, it does not calculate the default URL presented to the user when the property is not set.

See Also

Getting the User-Selected Document

var delegate: UIDocumentPickerDelegate?

An object that adheres to the UIDocumentPickerDelegate protocol.

protocol UIDocumentPickerDelegate

A set of methods that you implement to track when the user selects a document or destination, or to track when the operation is canceled.

var allowsMultipleSelection: Bool

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

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