Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

ons.platform browser detection methods not working on mobile



  • I’m sure I’m doing something wrong… The OS detection methods, for example ons.platform.isAndroid() and ons.platform.isIOS() are working fine.

    But I can’t get the browser detection methods to work, for example, ons.platform.isSafari() and ons.platform.isChrome(). They do work for me in desktop/laptop browsers but not on mobile, which is where I need them obviously.

    They just return false even though I am in that browser. Same for mobile Chrome, Safari, Firefox, Edge… I’m using them all within an ons.ready(function(){}). iPhone 11, latest iOS. Desperate. Are there any known pitfalls? Thanks



  • @danielfranz, I am not sure what you are trying to achieve and purpose.

    Is the app native?

    What is the app environment?