Ionic Native old plugin upgrade

I’m trying to upgrade an Ionic-native plugin that I need and unfortunately it’s not been upgraded since a couple of years now.

I created the plugin using the basic logic of the old one and I put the new plugin inside the node_modules but unfortunately, every time I try to run it in my code, I get “plugin not installed”.

Can you help me with this please? What are the steps I need to follow?

This is my stack:

Ionic CLI : 5.4.16 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 6.7.5
@angular-devkit/build-angular : 14.2.12
@angular-devkit/schematics : 14.2.12
@angular/cli : 14.2.12
@ionic/angular-toolkit : 7.0.0

Capacitor:

Capacitor CLI : 4.6.1
@capacitor/core : 4.6.1

Cordova:

Cordova CLI : 11.1.0

cordova-res : 0.15.4
native-run (update available: 1.7.3) : 1.7.2

System:

NodeJS : v18.10.0
npm : 8.19.2
OS : macOS Ventura
Xcode : Xcode 15.0 Build version 15A240d

Thanks in advance.

that’s old and for cordova

what is old, the ionic-native package or the cordova plugin it wraps?

ionic-native is deprecated and replaced with awesome-cordova-plugins

so there won’t be any updates on ionic-native packages, last update was two years ago, but most plugins have an up to date equivalent in awesome-cordova-plugins

If you mean the cordova plugin then you have to fork the original and make the changes you need, not create a new one, the plugin package needs to be the same so ionic-native/awesome-cordova-plugins detect it.

“If you mean the cordova plugin then you have to fork the original and make the changes you need, not create a new one, the plugin package needs to be the same so ionic-native/awesome-cordova-plugins detect it.”

I already did that but when i run the plugin i get the error “plugin not installed”.

“what is old, the ionic-native package or the cordova plugin it wraps?” the doc reference you sent me.

I didn’t send you any doc reference.
What I meant to ask is which package you say it’s not been upgraded since a couple of years.
And explained to you that ionic-native packages are deprecated and not maintained anymore, so it’s normal that it has not been updated for two years because it was deprecated two years ago, and replaced with awesome-cordova-plugins, so you should replace all your ionic-native packages with the awesome-cordova-plugin equivalents.

1 Like

Yes, I know… that’s what i’m trying to do… But I have to change a few things in a plugin that currently it’s not been upgraded in the new awesome cordova plugins…

I did the changes but there must be something I did wrong because of the error i’m getting and that’s what I’m asking help for.