# Can;t get cordova plugins working in ionic 3

**URL:** <https://forum.ionicframework.com/t/can-t-get-cordova-plugins-working-in-ionic-3/135123>\
**Category:** ionic-v3\
**Created:** [July 12, 2018, 1:45pm UTC](https://forum.ionicframework.com/t/can-t-get-cordova-plugins-working-in-ionic-3/135123 "2018-07-12T13:45:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lanosmusic](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@Lanosmusic](https://forum.ionicframework.com/u/Lanosmusic)\
**Post date:** [July 12, 2018, 1:45pm UTC](https://forum.ionicframework.com/t/can-t-get-cordova-plugins-working-in-ionic-3/135123/1 "2018-07-12T13:45:07Z")

</div>

HI Guys.

Pretty new to ionic switching from phonegap and f7. Absolutely love it however a few teething problems.

I’ve looked on the forums already to find a solution and none have worked.

I can’t seem to get non ionic native cordova plugins working in ionic.

My repro steps are:

```auto
ionic start projectname tabs
cd projectname
ionic cordova plugin add pluginname

```

Then just to test i went into the home.ts component to try and run a plugin function on device ready.

I’ve tried calling the plugin via:

```auto
window.plugins.pluginname.method();
window.pluginname.method();
(<any>window).plugins.pluginname.method();
cordova.plugins.pluginname.method();

```

I’ve even tried the following declares above the component

```auto
declare let cordova: any;
declare var window;

```

Every time i get an error saying undefined is not an object, and when i try to console log dump the plugin itself its coming up as null. Tried in a browser but also in devapp on IOS11.

My ionic info is below.

```auto
cli packages: (C:\Users\Robert.Lane\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.10
    Cordova Platforms : none
    Ionic Framework : ionic-angular 3.9.2

System:

    Node : v9.5.0
    npm : 5.6.0
    OS : Windows 10

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

```

Really pulling my hair out on this one, can someone please adivse. Or, if you have an example project with a a non standard cordova plugin working that would be amazing.

Thank you!

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:30pm UTC](https://forum.ionicframework.com/t/can-t-get-cordova-plugins-working-in-ionic-3/135123/2 "2021-07-19T21:30:02Z")

</div>

Closed on July 19, 2021, 9:30pm UTC


