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

cordova-plugin-x-socialsharing

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-x-socialsharing - npm Package Compare versions

Comparing version 5.6.0 to 5.6.1

2

package.json
{
"name": "cordova-plugin-x-socialsharing",
"version": "5.6.0",
"version": "5.6.1",
"description": "Share text, images (and other files), or a link via the native sharing widget of your device. Android is fully supported, as well as iOS 6 and up. WP8 has somewhat limited support.",

@@ -5,0 +5,0 @@ "cordova": {

@@ -27,3 +27,3 @@ # PhoneGap / Cordova Social Sharing plugin

7. [Share-popover on iPad](#7-share-popover-on-ipad)
8. [Whitelisting on iOS 9](#8-whitelisting-on-ios-9)
8. [Whitelisting on iOS](#8-whitelisting-on-ios)

@@ -34,5 +34,2 @@ ## 1. Description

* Works on Android, version 2.3.3 and higher (probably 2.2 as well).
* Works on iOS6 and up.
* Works on Windows Phone 8 since v4.0 of this plugin (maybe even WP7, but I have no such testdevice).
* Share text, a link, a images (or other files like pdf or ics). Subject is also supported, when the receiving app supports it.

@@ -158,3 +155,3 @@ * Supports sharing files from the internet, the local filesystem, or from the www folder.

### Using the share sheet
Since version 5.1.0 (for iOS and Android) it's recommended to use `shareWithOptions` as it's the most feature rich way to share stuff cross-platform.
It's recommended to use `shareWithOptions` as it's the most feature rich way to share stuff cross-platform.

@@ -171,3 +168,4 @@ It will also tell you if sharing to an app completed and which app that was (if that app plays nice, that is).

chooserTitle: 'Pick an app', // Android only, you can override the default share sheet title
appPackageName: 'com.apple.social.facebook' // Android only, you can provide id of the App you want to share with
appPackageName: 'com.apple.social.facebook', // Android only, you can provide id of the App you want to share with
iPadCoordinates: '0,0,0,0' //IOS only iPadCoordinates for where the popover should be point. Format with x,y,width,height
};

@@ -263,3 +261,3 @@

###### By phone number (since 5.3.0)
###### By phone number

@@ -270,3 +268,3 @@ ```html

###### By abid (iOS) or phone number (Android)
###### By "abid" (iOS) or phone number (Android)

@@ -357,16 +355,6 @@ ```html

If your app still supports iOS5, you'll want to check whether or not the plugin is available as it only supports iOS6 and up.
```javascript
window.plugins.socialsharing.available(function(isAvailable) {
// the boolean is only false on iOS < 6
if (isAvailable) {
// now use any of the share() functions
}
});
```
If you can't get the plugin to work, have a look at [this demo project](https://github.com/EddyVerbruggen/X-Services-PhoneGap-Build-Plugins-Demo).
#### Notes about the successCallback (you can just ignore the callbacks if you like)
Since version 3.8 the plugin passes a boolean to the successCallback to let the app know whether or not content was actually shared, or the share widget was closed by the user.
The plugin passes a boolean to the successCallback to let the app know whether or not content was actually shared, or the share widget was closed by the user.
On iOS this works as expected (except for Facebook, in case the app is installed), but on Android some sharing targets may return false, even though sharing succeeded. This is not a limitation of the plugin, it's the target app which doesn't play nice.

@@ -376,3 +364,4 @@ To make it more confusing, when sharing via SMS on Android, you'll likely always have the successCallback invoked. Thanks Google.

#### Sharing multiple images (or other files)
Since version 4.3.0 of this plugin you can pass an array of files to the share and shareVia functions.
You can pass an array of files to the share and shareVia functions.
```js

@@ -396,3 +385,4 @@ // sharing multiple images via Facebook (you can mix protocols and file locations)

#### Saving images to the photo album (iOS only currently)
Since version 4.3.16 of this plugin you can save an array of images to the camera roll:
You can save an array of images to the camera roll:
```js

@@ -520,5 +510,5 @@ window.plugins.socialsharing.saveToPhotoAlbum(

## 8. Whitelisting on iOS 9+
## 8. Whitelisting on iOS
On iOS 9 and newer you have to make sure to whitelist the applications you want to use for sharing. Without whitelisting "query schemes", you may get the error callback invoked when calling the `canShareVia` function (and possibly the `shareVia`). You can verify this is a permissions issue by observing the output in Xcode for something like:
Since iOS 9 you have to make sure to whitelist the applications you want to use for sharing. Without whitelisting "query schemes", you may get the error callback invoked when calling the `canShareVia` function (and possibly the `shareVia`). You can verify this is a permissions issue by observing the output in Xcode for something like:

@@ -566,3 +556,3 @@ > -canOpenURL: failed for URL: "whatsapp://app" - error: "This app is not allowed to query for scheme whatsapp"

This plugin requires permissions to the users photos. On iOS 10+, it is required that you provide a description for this access.
This plugin requires permissions to the users photos. Since iOS 10 it is required that you provide a description for this access.

@@ -569,0 +559,0 @@ The plugin configures a default description for you. If you do need to customise it, you can set a Cordova variable when installing:

@@ -37,3 +37,4 @@ function SocialSharing() {

message: sharedata.text,
url: sharedata.url
url: sharedata.url,
iPadCoordinates: sharedata.iPadCoordinates || undefined
};

@@ -50,4 +51,9 @@ if(sharedata.hasOwnProperty('title') ||

SocialSharing.prototype.share = function (message, subject, fileOrFileArray, url, successCallback, errorCallback) {
cordova.exec(successCallback, this._getErrorCallback(errorCallback, "share"), "SocialSharing", "share", [message, subject, this._asArray(fileOrFileArray), url]);
SocialSharing.prototype.share = function (message, subject, fileOrFileArray, url, iPadCoordinates, successCallback, errorCallback) {
if (typeof iPadCoordinates === 'function') {
errorCallback = successCallback;
successCallback = iPadCoordinates;
iPadCoordinates = "";
}
cordova.exec(successCallback, this._getErrorCallback(errorCallback, "share"), "SocialSharing", "share", [message, subject, this._asArray(fileOrFileArray), url, iPadCoordinates]);
};

@@ -54,0 +60,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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