0

I want some part of my code to work only when in mobile app, not on web/internet. How can I make it happen without having to change/comment code while loading into phoneGap build?

More specifically, from inside my code, is there a way to find that build is happening inside phoneGap build? Like, is there an environment variable set by phoneGap build that I could check in my code to include mobile app specific code?

Anilb
  • 43
  • 8
  • 1
    you can check its platform like if(device.platform == "Android" || device.platform == "iOS") then only your code will work. – Hiten Jun 01 '17 at 06:07
  • No, I need a build time check, not a run time check. – Anilb Jun 01 '17 at 12:47

0 Answers0