Puts data in the pasteboard for the specified representation type.
- iOS 3.0+
- Mac Catalyst 13.0+
The data object to be written to the pasteboard.
A string identifying the representation type of the pasteboard item. This is typically a UTI.
Use this method to put raw data on the pasteboard. For example, you could archive a graph of model objects and pass the resulting
NSData object to a related app via a pasteboard using a custom pasteboard type. (To put objects—such as
NSURL objects—on the pasteboard, use the
set method.) This method writes data for the first item in the pasteboard. Calling this method replaces any items currently in the pasteboard.