From my understanding of how the pasteboard works, is when a paste request is issued, the requester also indicates which data types it allows. Is there a way to get this information about an app before the paste request is issued?
2 Answers
No, you can't get the information about what pasteboard types an application can handle.
The application that is doing the paste operation does not exactly tell the system what data types it accepts. It filters the list of data types it receives based on some types. However, it can do this with dynamic information and it can filter multiple times with different sets of data types each time.
The API for the pasteboard is very flexible. There are some high-level methods where the app gives a list of types (or perhaps classes) which it can handle and gets back the relevant items (or objects). However, there are also low-level methods by which the app can enumerate all of the items and their types and pick one based on whatever logic it likes. It might never pass a list of types/classes into the framework. Even if it does pass a list of types/classes into the framework, that's handled internally to the app. It's not shared with the wider system because there's no reason to. And, as already mentioned, it can be a dynamic list.

- 88,520
- 7
- 116
- 154
Check NSPasteboardReading and NSPasteboardWriting protocol documentation.
// writableTypesForPasteboard: - Returns an array of UTI strings of data types the receiver can write to a given pasteboard
- (NSArray *)writableTypesForPasteboard:(NSPasteboard *)pasteboard
// readableTypesForPasteboard : - Returns an array of UTI strings of data types the receiver can read from the pasteboard and be initialized from
+ (NSArray *)readableTypesForPasteboard:(NSPasteboard *)pasteboard
If you need more details, I suggest reading "Pasteboard Programming Guide":https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/PasteboardGuide106/Introduction/Introduction.html

- 887
- 1
- 5
- 16