Puzzles

When using code

[[UIPasteboard generalPasteboard] setString:@"mung"];
NSLog(@"%@", [UIPasteboard generalPasteboard].string);

the console reports the new value of the line, but entering the -V command in another application shows the previous contents of the cardboard box (this may be nothing).

Is there a reliable way to save one line for use in another application?

Please inform. Thank.

+3
source share
1 answer

The UIPboardboard simulator (access through a menu controller processed using pasteboardd) is independent of the NSPasteboard node (access through Cmd + C / V processed /usr/sbin/pboard).

+2
source

Source: https://habr.com/ru/post/1729932/


All Articles