New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@capacitor/share

Package Overview
Dependencies
Maintainers
7
Versions
702
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capacitor/share

The Share API provides methods for sharing content in any sharing-enabled apps the user may have installed.

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
41K
decreased by-36.85%
Maintainers
7
Weekly downloads
 
Created
Source

@capacitor/share

The Share API provides methods for sharing content in any sharing-enabled apps the user may have installed.

The Share API works on iOS, Android, and the Web (using the new Web Share API), though web support is currently spotty.

Install

npm install @capacitor/share
npx cap sync

Example

import { Share } from '@capacitor/share';

await Share.share({
  title: 'See cool stuff',
  text: 'Really awesome thing you need to see right meow',
  url: 'http://ionicframework.com/',
  dialogTitle: 'Share with buddies',
});

Each platform uses a different set of fields, but you should supply them all.

API

share(...)

share(options: ShareOptions) => Promise<ShareResult>

Show a Share modal for sharing content with other apps

ParamType
optionsShareOptions

Returns: Promise<ShareResult>

Since: 1.0.0


Interfaces

ShareResult
PropTypeDescriptionSince
activityTypestringIdentifier of the app that received the share action. Can be an empty string in some cases. On web it will be undefined.1.0.0
ShareOptions
PropTypeDescriptionSince
titlestringSet a title for any message. This will be the subject if sharing to email1.0.0
textstringSet some text to share1.0.0
urlstringSet a URL to share, can be http, https or file:// URL1.0.0
dialogTitlestringSet a title for the share modal. This option is only supported on Android.1.0.0

Keywords

FAQs

Package last updated on 07 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc