Cordova + ionic 0.9.23 'device plugin required'

On ionic.js line 1801, it complaints about

‘device plugin required’

everytime, i dit some research, and it seems to be something related to the onCordovaInfoReady event never firing.

any ideas?

Run this and then run your build again:

cordova plugin add org.apache.cordova.device

already tried, error still shows

Can you try entering ‘cordova plugin’ in the directory of your project and note the output?

It should have a line saying 'org.apache.cordova.device'.

yes, i have:

[ ‘org.apache.cordova.device’ ]

cordova is up-to-date?
Have you removed the plugin and add it again?

cordova -version

yes, tried removing the plugin and re-adding, plugin works fine without ionic

have you tried the nightly ionic build?

Which code are you using that leads to the error ‘device plugin required’? Are you using ionicPlatform.ready?

i´m not using any code, ionic breaks by itself…

ionic handles ‘deviceready’ by itself, it fails for some reason when it tries to detect isCordova(), therefore complaining about the plugin

Are you using this in your browser, simulator or device?

simulator and device

Have you used cordova build ios before running it in the simulator? You need to be doing that every time you add / remove plugins or change code.

yes i did, i can access on a webpage that does not use ionic by setting the deviceready and then using the plugins variables

Have you tried including cordova.js in your page before ionic?

1 Like

Make sure your config.xml includes this line:

<feature name="" />

Depending on platform, that may be required. If Android, then yes. If iOS , then no.

I´m getting same problem here

1 Like

i have the same problem here as well. tried also remove and add and still the same error. with ionic 0.9.21 it wasn’t

Did you use the ionic cli?