Skip to main content
Version: 0.68

Share

Example​

Reference

Methods​

share()​

static share(content, options)

Open a dialog to share text content.

In iOS, returns a Promise which will be invoked with an object containing action and activityType. If the user dismissed the dialog, the Promise will still be resolved with action being Share.dismissedAction and all the other keys being undefined. Note that some share options will not appear or work on the iOS simulator.

In Android, returns a Promise which will always be resolved with action being Share.sharedAction.

Properties:

NameTypeDescription
content
Required
objectmessage - a message to share
url - a URL to share
iOS

title - title of the message
Android

At least one of url and message is required.
optionsobjectdialogTitle
Android

excludedActivityTypes
iOS

subject - a subject to share via email
iOS

tintColor
iOS

Properties​

sharedAction​

static sharedAction

The content was successfully shared.


dismissedAction
iOS
​

static dismissedAction

The dialog has been dismissed.