Problem with social sharing plugin


#1

Hey guys I have some problems with the SocialSharing plugin, I tried to test the some plugins, but I have some problems at the time to share a screenshot whit the plugin SocialSharing https://ionicframework.com/docs/native/social-sharing/ when I select share via WhatsApp in android shares perfectly the image but in iOS in doesn’t share the image only the message.

This is the code im using:

import { Component } from ‘@angular/core’;
import { NavController } from ‘ionic-angular’;

import { Screenshot } from ‘@ionic-native/screenshot’;
import { SocialSharing } from ‘@ionic-native/social-sharing’;

@Component({
selector: ‘page-list’,
templateUrl: ‘list.html’
})
export class ListPage {
imageURI: string = ‘’;
constructor(public navCtrl: NavController, private screenshot: Screenshot, private socialSharing: SocialSharing) {

}

takeScreenShot(){
this.screenshot.save(‘jpg’, 80, ‘myscreenshot’).then(onSuccess=>{
this.imageURI = onSuccess.filePath;
console.log(onSuccess)
}, onError => {
console.log(onError)
});
}

shareLastScreenShot(){
if (this.imageURI != ‘’) {
this.socialSharing.share(“Te comparto este screenshot”,“Use Ionic Native Social Share”,[‘file://’+this.imageURI]).then(success=>{
console.log(success)
alert(‘Well done’)
}).catch(error=>{
console.log(error)
alert(“error al compartir”)
})
}
else{
alert(‘No hay imagen que compartir’)
}
}
}

all the app is here: https://github.com/zedlen/energ-tica

I don’t know why I can’t share the image on iOS

Thanks, sorry for bad English


#2

Have you found solution for this?
I am also facing exact same issue.
I am only dealing with WhatsApp though.