I have a meteor application that is deployed for both ios and Android devices, and I want certain code to work only on the ios device, not on android. I know that I can detect a device using navigator.userAgent, but this will only work if I have an application running in a browser.
// This works if its browser
navigator.userAgent.toLowerCase().indexOf("android") > -1;
But is there any possible way to detect the device if I created a package for android using the meleor cordova plugin, so it works like a native application.
Nakib source share