I have made a stackblitz project with the issue.
https://stackblitz.com/edit/ionic6-angular13-yngs1m?file=src/app/app.component.css
Whenever I try to use this plugin I get a rxjs error about incompatibility with Ionic Native. Ive tried installing it with --force and --legacy-peer-deps, and downgrading rxjs, which doesnt even work. Whatever I do, rxjs is always version 7.8.0.
To recreate this issue yourself in your own environment:
- Create a new blank Ionic project with Angular
- Install the
@ionic-native/social-sharing@4
plugin withnpm i @ionic-native/social-sharing@4
. - Import the plugin in your component with:
import { SocialSharing } from '@ionic-native/social-sharing'
. - Instantiate SocialSharing in the constructor with:
private socialSharing: SocialSharing
In my case, when I run the app I already get issues with rxjs.
- Add the following code to the ts in a method (in my case
share() {}
):
let options = { subject: "Subject", message: "Message" }
this.socialSharing.shareWithOptions(options);
Let me know if you know a way to fix this issue. My goal is to be able to share images using their local path. Clicking the share button will call the share()
method and bring up the native share window for IOS and Android where users can select which platform they want to use to share the image