Is there some developer tool or other open source app that allows us to peek the current contents of the (or, rather: any) NSPasteboard instance?

Browsing through the Xcode directories (contents of the /Developer folder before Xcode 4) doesn't turn up anything that looks useful.

We're currently developing the copy and paste feature for our app and some way to conveniently debug what's currently in the pasteboard would be invaluable and would save heaps of development time..

有帮助吗?

解决方案

Apple actually has sample code that gives a great start to a project of this type:

ClipboardViewer at developer.apple.com

其他提示

You could always iterate through the pasteboard and log what's there.

for(id object in [[UIPasteboard generalPasteboard] items]) {
    NSLog(@"Object: %@", object);
}
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top