diff --git a/package.json b/package.json index 7e5dcc8b..190d4d8a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-x-socialsharing", - "version": "5.6.3", + "version": "5.6.4", "description": "Share text, images (and other files), or a link via the native sharing widget of your device. Android is fully supported, as well as iOS 6 and up. WP8 has somewhat limited support.", "cordova": { "id": "cordova-plugin-x-socialsharing", diff --git a/plugin.xml b/plugin.xml index 62b1342e..831896f9 100755 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="5.6.4"> SocialSharing diff --git a/src/ios/SocialSharing.m b/src/ios/SocialSharing.m index a7ffe935..75c8b41b 100644 --- a/src/ios/SocialSharing.m +++ b/src/ios/SocialSharing.m @@ -331,8 +331,8 @@ - (void)shareViaInternal:(CDVInvokedUrlCommand*)command if (SLComposeViewControllerResultCancelled == result) { CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"cancelled"]; [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - } else if ([self isAvailableForSharing:command type:type]) { - CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:SLComposeViewControllerResultDone == result]; + } else if (SLComposeViewControllerResultDone == result || [self isAvailableForSharing:command type:type]) { + CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:true]; [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; } else { CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"not available"];