I'm trying to put some plain text in the iPhone pasteboard. The following code doesn't seem to work:
UIPasteboard *pboard = [UIPasteboard generalPasteboard];
NSString *value = @"test";
[pboard setValue: value forPasteboardType: @"public.plain-text"];
I'm guessing the problem is in the pasteboard type argument. Passing @"public.plain-text" nothing happens. Passing kUTTypePlainText the compiler complains about incompatible pointer type, but doesn't crash, and nothing happens either. Using kUTTypePlainText also seems to require linking with MobileCoreServices, which is not mentioned in the docs.