Link to home
Start Free TrialLog in
Avatar of Martin Wong
Martin Wong

asked on

ionic run android / ios - cordova plugins don't work

Hi, so I've got an Ionic 3 app which has a native camera plugin and onesignal plugin as well for notifications.

The native camera plugin works fine in Ionic View or DevApp, and onesignal works when build it to an APK and run it natively on my Android phone.

However, when I use an emulator to run it, even on IOS, it comes up with cordova_not_available. And even the cameras don't work. i run the command

ionic cordova run android or ionic cordova run ios

Emulator shows up but the issue is that cordova doesn't seem to be compiled in. Thus causing cordova plugins to fail.

What can possible be the issue? I've removed all the plugins and android/ios platform, re-installed an still the same.

It's kind of difficult to develop the OneSignal notification when I can't run it with the emulator.

Anyone who has come across this, please advice.
Avatar of Marco Gasi
Marco Gasi
Flag of Spain image

I'm not expert on Ionic, but I think you should use

ionic emulate android

Open in new window


or

ionic emulate ios

Open in new window

Avatar of Soesanto Salim
Soesanto Salim

This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.