From dac4c0e5eb29fbccbc9c6f9c0e8c45971b5deea7 Mon Sep 17 00:00:00 2001 From: XPanniX Date: Mon, 24 Oct 2016 18:53:58 +0200 Subject: [PATCH] iOS 10 Copy Fix As suggested by @zwand19 in #26 --- src/ios/CDVClipboard.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ios/CDVClipboard.m b/src/ios/CDVClipboard.m index c70378c..2658d82 100644 --- a/src/ios/CDVClipboard.m +++ b/src/ios/CDVClipboard.m @@ -10,7 +10,7 @@ - (void)copy:(CDVInvokedUrlCommand*)command { UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; NSString *text = [command.arguments objectAtIndex:0]; - [pasteboard setValue:text forPasteboardType:@"public.text"]; + pasteboard.string = text; CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:text]; [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; @@ -27,4 +27,4 @@ - (void)paste:(CDVInvokedUrlCommand*)command { }]; } -@end \ No newline at end of file +@end