I encountered some issues when trying to put more than one data representation onto the pasteboard on iPhone 3.0.
What I'm trying to do is put a data representation and a string representation onto the pasteboard. The data is my own data type and I use it for copy and paste in my application. The string representation is a way to copy and paste the content of my application as an outline into an other application (for example Mail.app).
// payload
NSString *pasteboardString = [selectedNode stringRepresentation];
NSDictionary *pasteboardDictionary = [selectedNode nodeAndSubnodesProperties];
// set payload
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
pasteboard.string = pasteboardString;
[pasteboard setValue:pasteboardDictionary forPasteboardType:MNTNodesPasteboardType];
The above code doesn't work because the string property and setValue:forPasteboardType: methode replace the first representation on the pasteboard. I tried addItems: but it didn't work for me.
Thank you for any help!