From e150224cda22815abf23b254309469c5038e43c5 Mon Sep 17 00:00:00 2001 From: Ibby Hadeed Date: Mon, 11 Jul 2016 17:20:11 -0400 Subject: [PATCH] fix(socialsharing): all methods return Promises now closes #275 --- src/plugins/socialsharing.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/plugins/socialsharing.ts b/src/plugins/socialsharing.ts index f94d755474..c6053bad4b 100644 --- a/src/plugins/socialsharing.ts +++ b/src/plugins/socialsharing.ts @@ -28,10 +28,8 @@ export class SocialSharing { * @param file {string|Array} URL(s) to file(s) or image(s), local path(s) to file(s) or image(s), or base64 data of an image. Only the first file/image will be used on Windows Phone. * @param url {string} A URL to share */ - @Cordova({ - sync: true - }) - static share (message?: string, subject?: string, file?: string|Array, url?: string): void {} + @Cordova() + static share (message?: string, subject?: string, file?: string|Array, url?: string): Promise {return; } /** * Shares using the share sheet with additional options and returns a result object or an error message (requires plugin version 5.1.0+) @@ -58,10 +56,9 @@ export class SocialSharing { * @param url */ @Cordova({ - sync: true, platforms: ['iOS', 'Android'] }) - static shareViaTwitter (message: string, image?: string, url?: string): void {} + static shareViaTwitter (message: string, image?: string, url?: string): Promise {return; } /** * Shares directly to Facebook