Contents

validTypes

An array of valid uniform type identifiers.

Declaration

var validTypes: [String]? { get }

Discussion

While in the UIDocumentPickerModeImport or UIDocumentPickerModeOpen modes, this property holds an array of valid UTIs; otherwise, it is nil.

Check the value of this property before your Document Picker extension displays any files to the user. You should let the user select only files that match at least one of the given UTIs.

See Also

Managing the user interface