We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 27457c2 commit d16de32Copy full SHA for d16de32
1 file changed
src/system/Device.js
@@ -57,6 +57,12 @@ Phaser.Device = function () {
57
*/
58
this.iOS = false;
59
60
+ /**
61
+ * @property {number} iOSVersion - If running in iOS this will contain the major version number.
62
+ * @default
63
+ */
64
+ this.iOSVersion = 0;
65
+
66
/**
67
* @property {boolean} cocoonJS - Is the game running under CocoonJS?
68
* @default
@@ -658,6 +664,8 @@ Phaser.Device._initialize = function () {
658
664
else if (/iP[ao]d|iPhone/i.test(ua))
659
665
{
660
666
device.iOS = true;
667
+ var v = (navigator.appVersion).match(/OS (\d+)/);
668
+ device.iOSVersion = parseInt(RegExp.$1, 10);
661
669
}
662
670
else if (/Linux/.test(ua))
663
671
0 commit comments