Gladisson
Gladisson

Reputation: 137

Ionic 6 cordova/capacitor social share not working on ios

I used "cordova-plugin-x-socialsharing" on Android it is working normally, but on IOS when trying to share with any social network I get the error "not available"

As an alternative, I tried using the "Share capacitor", but when choosing whatsapp an alert is displayed with the message "Open Whatsapp from the home screen to continue" however even opening the application it continues to display this same message.

shareWithWhatsapp(content) {
   this.sharePlugin
      .canShareVia('whatsapp', content.message, '', content.image, content.url)
      .then(() => {
        this.sharePlugin.shareViaWhatsApp(content.message, content.image, content.url);
      })
      .catch((e) => {
        this.showMessage('Error to try share with whatsapp');
      });
}

Upvotes: 0

Views: 701

Answers (1)

softbrewery
softbrewery

Reputation: 501

try to share only message, maybe whatsapp still has problem with share plugin.

Note that on iOS when sharing an image and text, only the image is shared - let's hope WhatsApp creates a proper iOS extension to fix this.

Refer: https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin#whatsapp

Upvotes: 0

Related Questions