ionic-team / create-capacitor-plugin

Create a new Capacitor plugin ⚡️
Other
74 stars 11 forks source link

Choosing older capacitor version #87

Closed filipRisteski closed 1 year ago

filipRisteski commented 1 year ago

I need to create a Capacitor 4 plugin. I poked around files, but I couldn't find any option to indicate which Capacitor version I want. I am fine going with 5, but in our Ionic app many other capacitor plugins we are using are still not compatible with version 5, so I specifically need to go with 4.

Am I missing something here?

I also tried to use the capacitor/cli@4 plugin:generate but it was removed long time ago from cli, so no luck there too.

jcesarmobile commented 1 year ago

You should be able to create a plugin for an older Capacitor version if you use the package version that added support for the Capacitor version you want to use, in example for Capacitor 4 you should be able to use npx @capacitor/create-plugin@0.9.0