I’m trying to use this plugin in my ionic 2 app but thus far, I’ve been unsuccessful.
I added it using cordova plugin add https://github.com/elizabethrego/cordova-plugin-unimag-swiper/
Afterwards I try to access it using the following:
cordova.plugins.unimag.swiper.activate();
cordova.plugins.unimag.swiper.enableLogs(true);
cordova.plugins.unimag.swiper.setReaderType(‘unimag_ii’);
I get the error “Cannot read property ‘unimag’ of undefined”
I tried adding the following interface to my typings folder as explained here
interface Window {
plugins: any;
}
The error still persists. Can you point me in the right direction? I’m having a hard time finding resources for using cordova plugins in ionic 2 that aren’t native plugins.