NSItemProvider.CompletionHandler
A block that receives the item provider’s data.
Declaration
typealias CompletionHandler = @Sendable ((any NSSecureCoding)?, (any Error)?) -> VoidDiscussion
Use this block to receive data from a call to the loadItem(forTypeIdentifier:options:completionHandler:) method. This block takes the following parameters:
- item
The item to be loaded. When specifying your block, set the type of this parameter to the specific data type you want. For example, when requesting text data, you might set the type to NSString or NSAttributedString. The item provider attempts to coerce the data to the class you specify.
- error
A pointer to an error object for receiving information about any problems that occurred when loading the data.