Search code examples
androidiosangularjsionic-frameworkngcordova

CDVPlugin class SocialSharing (pluginName: SocialSharing) does not exist


Social Sharing plugins working well in Android. But the same code shows the following error in iOS Device.

All the plugins are installed .

Error:

plugin com.skype.SkypeForiPad.sharingextension invalidated 2016-04-26 19:21:26.285 AiCura_App[id] SocialSharing app selected: (null)

Code :

   $scope.shareViaTwitter=function (title, source, link){
  window.plugins.socialsharing.shareViaTwitter(title,
                                                  null /* img */,
                                                  link /* url */, 
                                                  source, 
                                                  function(errormsg){


        alertService.showAlert('You Have to install Twitter application to share this news')}
      //  alert("You Have to install Twitter application to share this news")}
                                                  );
 };

Solution

  • Execute all ionic and cordova commands with sudo ... (Administrator privillage)

    • sudo ionic plugin add [plugin-name]

    • sudo cordova prepare ios

    • etc ...