Support for Social Sharing plugin and use of jetifier

Hi, I have an Ionic app, first start in 2017. but keep up to date (e.g. have lates Ionic and Angular libs) - I just have not got around to switch to Capacitor. as I will need to re work out how to do the command line builds done my my auto build.

Anyhow, I have always use the Social Sharing so users could easily have my log files attached to an email and sent to me.

I found when testing on my new Pixel 9, Android 15, it crashed the whole app when opening the email. I have logged an issue here, and could see the exception when running in debug in Android studio (an invalid cast from ArrayList to string), but could not understand the code leading to it.

Now elsewhere, I found this document, ie “Social Sharing will reach its end-of-life on July 1, 2024”, but I see no email alternatives (in Capacitor or otherwise)

I then saw the

npm install jetifier
npx jetifier

So I installed this and it does seem to have fixed the issue (and still works on an older Android, eg 13 version). I had never seen this jetifier mentioned before.

So all seems fine, but when I went to see what this package is at on GitHub, I see in big letters…

DO NOT USE THIS OBSOLETE PACKAGE

It seems to task about react native for some reason (a Cordova plugin should be framework agnostic surely)

So, its seems that the Social Sharing DOES need this old package, and it SEEMS perhaps Social Sharing may longer be maintained, but with this jetifier seems to work

My questions are

  • Can using this jetifier do any harm (it does not seem to)
  • Is there any alternative to Social Sharing to be able to send an email with an attachment?

Thanks in advance

The plugin you are using is GitHub - EddyVerbruggen/SocialSharing-PhoneGap-Plugin: 👨‍❤️‍💋‍👨 Cordova plugin to share text, a file (image/PDF/..), or a URL (or all three) via the native sharing widget. The plugin is unmaintained, last update was 3 years ago,

Social Sharing | Awesome Cordova Plugins is just a wrapper around that plugin that makes the plugin easier to use in Typescript projects.

Social Sharing Capacitor & Cordova Plugin for Data Share | Ionic this was a fork of EddyVerbruggen’s plugin, it was a paid plugin and it’s not maintained anymore.

Despite the message says " DO NOT USE THIS OBSOLETE PACKAGE", it’s because everything should be updated by now to not need jetifier, but since you are using an out of date plugin, you need to keep using jetifier, unless you fork the plugin and update it to not need jetifier (basically move the old android support dependency to a new AndroidX replacement)

2 Likes

Ok, thanks for that, makes sense. Yes I realized Ionic was just a wrapper.

I don’t suppose any one knows of a more “up to date” maintained email wrapper (email is all I need). It does not have to have an Ionic wrapper, as long as I can call it from the JS code?

I Have looked, but so far, to my surprise, could not find.