How can I user File opener OR Document Viewer Ionic Native plugins in Ionic-v3?

#1

Hello I am trying the File Opener and Document Viewer plugins in Ionic-v4 and it’s worked fine but I implemented in Ionic-v3 it’s getting the TypeError.

I am sharing my config of Ionic and our system.

Ionic:

ionic (Ionic CLI) : 4.5.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.3
@ionic/app-scripts : 3.2.1

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.4, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 7 other plugins)

System:

Android SDK Tools : 26.1.1 (/Users/apple/Library/Android/sdk)
ios-deploy : 1.9.4
NodeJS : v10.14.1 (/usr/local/bin/node)
npm : 6.5.0
OS : macOS Mojave
Xcode : Xcode 10.1 Build version 10B61

And I am sharing the error is below:

 [Error] ERROR – TypeError: Object(__WEBPACK_IMPORTED_MODULE_1__ionic_native_core__["cordovaPropertyGet"]) is not a function. (In 'Object(__WEBPACK_IMPORTED_MODULE_1__ionic_native_core__["cordovaPropertyGet"])(this, "documentsDirectory")', 'Object(__WEBPACK_IMPORTED_MODULE_1__ionic_native_core__["cordovaPropertyGet"])' is an instance of Object)
TypeError: Object(__WEBPACK_IMPORTED_MODULE_1__ionic_native_core__["cordovaPropertyGet"]) is not a function. (In 'Object(__WEBPACK_IMPORTED_MODULE_1__ionic_native_core__["cordovaPropertyGet"])(this, "documentsDirectory")', 'Object(__WEBPACK_IMPORTED_MODULE_1__ionic_native_core__["cordovaPropertyGet"])' is an instance of Object)get — index.js:697downloadOpenPdf — home.ts:46(anonymous function)callWithDebugContext — core.js:15098dispatchEvent — core.js:10004(anonymous function) — platform-browser.js:2628onInvokeTask — core.js:4751runTask — polyfills.js:3:10845invokeTask — polyfills.js:3:16802p — polyfills.js:2:27655v — polyfills.js:2:27895
	error
	View_HomePage_0 (HomePage.ngfactory.js:25)
	logError (vendor.js:15363)
	(anonymous function)
	handleError (vendor.js:1835)
	handleError (vendor.js:122728)
	dispatchEvent (vendor.js:10333)
	(anonymous function) (vendor.js:39445)
	onInvokeTask (vendor.js:5076)
	runTask (polyfills.js:3:10845)
	invokeTask (polyfills.js:3:16802)
	p (polyfills.js:2:27655)
	v (polyfills.js:2:27895)

So What can I do for it?

Thanks in advance!

Regards,
Karmdip Joshi