Share
Exampleβ
- Function Component
- Class Component
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.
Contentβ
message- a message to share
iOSβ
url- an URL to share
At least one of URL and message is required.
Androidβ
title- title of the message
Optionsβ
iOSβ
subject- a subject to share via emailexcludedActivityTypestintColor
Androidβ
dialogTitle
sharedActionβ
static sharedAction
The content was successfully shared.
dismissedActionβ
static dismissedAction
iOS Only. The dialog has been dismissed.