Sharing
The Share
action allows you to invoke the "share sheet" to share content from your embedded app on an iOS or Android device.
Requirements
Anchor link to section titled "Requirements"These actions require the following app versions:
- Shopify iOS v8.22.0 or above
- Shopify Android v8.25.0 or above
- Point of Sale iOS v5.29.0 or above
- Point of Sale Android v3.24.0 or above
Create an app and import the Share
module from @shopify/app-bridge/actions
. Note that we'll be referring to this sample application throughout the examples below.
Share Close action
Anchor link to section titled "Share Close action"Group | Share |
---|---|
Action | CLOSE |
Action Type | APP::SHARE::CLOSE |
Description | Dispatches after closing the Share Sheet. |
The Share
action lets you share content from your app to any third-party app on the user's device, as long as the app supports the payload type. Some apps only support text and some support URLs and text.
Subscribe to Share Close:
Anchor link to section titled "Subscribe to Share Close:"
Key | Type | Description |
---|---|---|
success |
Boolean | Whether the share was successful or canceled. |
Share Open action
Anchor link to section titled "Share Open action"Group | Share |
---|---|
Action | SHOW |
Action Type | APP::SHARE::SHOW |
Description | Opens a Share Sheet that allows you to share content with other apps. |
Key | Type | Description |
---|---|---|
text |
String? | The text to share. |
url |
String? | The URL to share. |