If you cannot use a CLI, follow these steps to manually integrate the plugin:
1. Configure config.xml
Add the appropriate feature tag to your config.xml files:
iOS:
<feature name="SocialSharing">
<param name="ios-package" value="SocialSharing" />
</feature>
Android:
<feature name="SocialSharing">
<param name="android-package" value="nl.xservices.plugins.SocialSharing" />
</feature>
Windows Phone:
<feature name="SocialSharing">
<param name="wp-package" value="SocialSharing"/>
</feature>
2. Platform Specific Requirements
Android:
To share remote files (like images) on Android, you must first store them locally. Add this permission to your AndroidManifest.xml:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
iOS:
You must add Social.framework and MessageUI.framework to your project. In Xcode, go to Build Phases > Link Binary With Libraries and add both frameworks.
3. Add JavaScript and Source Files
- Copy
SocialSharing.js to your project and reference it in index.html:
<script type="text/javascript" src="js/SocialSharing.js"></script>
- Copy the platform-specific source files to the following locations:
- iOS: Copy
SocialSharing.h and SocialSharing.m to platforms/ios/<ProjectName>/Plugins - Android: Copy
SocialSharing.java to platforms/android/src/nl/xservices/plugins (create the folders if they don't exist) - Windows Phone: Copy
SocialSharing.cs to platforms/wp8/Plugins/nl.x-services.plugins.socialsharing (create the folders if they don't exist)
<!-- for iOS -->
<feature name="SocialSharing">
<param name="ios-package" value="SocialSharing" />
</feature>
<!-- for Android (you will find one in res/xml) -->
<feature name="SocialSharing">
<param name="android-package" value="nl.xservices.plugins.SocialSharing" />
</feature>
<!-- for Windows Phone -->
<feature name="SocialSharing">
<param name="wp-package" value="SocialSharing"/>
</feature>