Ionic View detection


#1

Ionic view is an awesome way to share and test but sadly not all natif plugins work.
How can i detect i’m running on Ionic View, like i can detect if i’m on cordova or browser to prevent all bug with my natif plugins?

if(IsIonicView()){
        runMyNatifCode();
 }
 else{
        runMyFakeNatifCode();
 }

I found “Ionic View” in navigator.userAgent on Android but not on Ios.
Is someone already dealt with this?

Thanks


#2

U can use Ionic Platform https://ionicframework.com/docs/api/platform/Platform/ to detect if i’m on cordova or browser to prevent all bug with my natif plugins?


#3

Yes i know ionic platform can help me to know if i’m running on browser or device, but how can i know if i’m running through ionic view?