Instance Method

canLoadObject(ofClass:)

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

Declaration

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

See Also

Getting the Item’s Data

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 hasRepresentationConforming(toTypeIdentifier: String, fileOptions: NSItemProviderFileOptions = []) -> Bool

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.

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.