Instance Method

hasRepresentationConforming(toTypeIdentifier:fileOptions:)

Returns a Boolean value indicating whether an item provider contains a data representation conforming to a specified uniform type identifier (UTI) and to specified open-in-place behavior.

Declaration

func hasRepresentationConforming(toTypeIdentifier typeIdentifier: String, fileOptions: NSItemProviderFileOptions = []) -> Bool

Discussion

To check all registered UTIs for type conformance, pass the value 0 in the fileOptions parameter.

See Also

Getting the Item’s Data

func canLoadObject(ofClass: NSItemProviderReading.Type) -> Bool

Returns a Boolean value indicating whether an item provider can load objects of a given class.

func hasItemConformingToTypeIdentifier(String) -> Bool

A convenience method equivalent to the hasRepresentationConforming(toTypeIdentifier:fileOptions:) method, but with the fileOptions parameter set to a value of 0.

func loadDataRepresentation(forTypeIdentifier: String, completionHandler: (Data?, Error?) -> Void) -> Progress

Asynchronously copies the provided, typed data into a Data object, returning a Progress object.

func loadFileRepresentation(forTypeIdentifier: String, completionHandler: (URL?, Error?) -> Void) -> Progress

Asynchronously writes a copy of the provided, typed data to a temporary file, returning a Progress object.

func loadInPlaceFileRepresentation(forTypeIdentifier: String, completionHandler: (URL?, Bool, Error?) -> Void) -> Progress

Asynchronously opens a file in place, if doing so is possible, returning a Progress object.

func loadObject(ofClass: NSItemProviderReading.Type, completionHandler: (NSItemProviderReading?, Error?) -> Void) -> Progress

Asynchronously loads an object of a specified class to an item provider, returning a Progress object.

func registeredTypeIdentifiers(fileOptions: NSItemProviderFileOptions = []) -> [String]

Returns an array with a subset of type identifiers for the item provider, according to the specified file options, listed in the same order in which they were registered.