From 6b88edc6a8ac789bdf09b69076d3a4fa803deb0a Mon Sep 17 00:00:00 2001 From: EddyVerbruggen Date: Thu, 13 Feb 2020 22:27:49 +0100 Subject: [PATCH] shareViaFacebook callback return "not available" #1001 --- package.json | 2 +- plugin.xml | 2 +- src/ios/SocialSharing.m | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) 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"];