From 895b5aaa9505de969ce32dfbe98b882566c2ef9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Fern=C3=A1ndez?= Date: Mon, 13 Jun 2016 19:13:58 +0200 Subject: [PATCH] SocialSharing: Add recommended `shareWithOptions` method --- src/plugins/socialsharing.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/plugins/socialsharing.ts b/src/plugins/socialsharing.ts index d7e5a584..f94d7554 100644 --- a/src/plugins/socialsharing.ts +++ b/src/plugins/socialsharing.ts @@ -33,6 +33,15 @@ export class SocialSharing { }) static share (message?: string, subject?: string, file?: string|Array, url?: string): void {} + /** + * Shares using the share sheet with additional options and returns a result object or an error message (requires plugin version 5.1.0+) + * @param options {object} The options object with the message, subject, files, url and chooserTitle properties. + */ + @Cordova({ + platforms: ['iOS', 'Android'] + }) + static shareWithOptions (options: { message?: string, subject?: string, file?: string|Array, url?: string, chooserTitle?: string }): Promise {return; } + /** * Checks if you can share via a specific app. * @param appName App name or package name. Examples: instagram or com.apple.social.facebook @@ -136,4 +145,4 @@ export class SocialSharing { static shareViaEmail(message: string, subject: string, to: Array, cc: Array, bcc: Array, files: string|Array): Promise {return; } -} \ No newline at end of file +}