Detecting the Mobile OS version and type – getMobileOSver v1.2

This new release of getMobileOSverJS fixes a bug and adds new features.

The bug fix is if the OS version was two digits (e.g. 10.0), the version number was being truncated one char. This now functions correctly.

Windows Phone is now supported and tested with v8.0 thru v10.0.

There are new flags to make your coding easier, more readable and less error prone. The flags are .android .ios .ipad .ipod .iphone .windowsphone – these are set to true when those devices are detected, so you can say in your code if (getMobileOSver.ios) {...}

The OS version number is now divided into .major .minor . patch version numbers (not strings) make testing for a certain version much easier, for example if (getMobileOSver.major >= 9) {...}

Posted in mobile development Tagged with: , , , ,