diff --git a/src/ios/CDVClipboard.m b/src/ios/CDVClipboard.m index 6c09b78..d3a06f9 100644 --- a/src/ios/CDVClipboard.m +++ b/src/ios/CDVClipboard.m @@ -21,6 +21,9 @@ - (void)paste:(CDVInvokedUrlCommand*)command { [self.commandDelegate runInBackground:^{ UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; NSString *text = [pasteboard valueForPasteboardType:@"public.text"]; + if (text == nil) { + text = @""; + } CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:text]; [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];