Using a Cordova plugin with Capacitor

后端 未结 1 1027
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-19 08:31

I\'ve been working through this example: https://capacitor.ionicframework.com/docs/basics/cordova

I\'ve run:

npm install cordova-plugin-qrscanner
npx cap         


        
相关标签:
1条回答
  • 2021-02-19 09:30

    Remember you can install the native wrapper too. It should work just the same as using it with Cordova.

    npm install @ionic-native/qr-scanner
    

    From:

    ionic cordova plugin add cordova-plugin-qrscanner
    npm install @ionic-native/qr-scanner
    

    To:

    npm install cordova-plugin-qrscanner
    npm install @ionic-native/qr-scanner
    npx cap sync
    

    https://ionicframework.com/docs/native/qr-scanner

    0 讨论(0)
提交回复
热议问题