What is the right way to use Ionic Native / Cordova Plugins with Ionic (React) & Capacitor?

前端 未结 1 1937

How can I use Ionic Native / Cordova Plugins with Ionic React (not Angular) using Capacitor instead of Cordova?

I want to make use of Screen Orientation Plugin with Capa

相关标签:
1条回答
  • 2021-02-14 12:55

    Problem solved! I was doing everything right, I had just forgotten to run npx cap sync after installing my Ionic Native Plugin.

    So, the right way to use Cordova Plugins with Capacitor & Ionic (React) is

    npm install @ionic-native/javascript-package-name
    npm install cordova-plugin-name
    npx cap sync
    
    0 讨论(0)
提交回复
热议问题