Comparing version 1.0.2 to 1.1.0
{ | ||
"name": "ti.detect", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "A simple Titanium library to detect things", | ||
@@ -5,0 +5,0 @@ "main": "ti.detect.js", |
@@ -7,2 +7,3 @@ var hasNotch = false; | ||
// iPhone X/Xs/XR | ||
// iPhone X/Xs/XR/12 mini | ||
Ti.Platform.displayCaps.platformWidth === 375 && | ||
@@ -13,3 +14,2 @@ Ti.Platform.displayCaps.platformHeight === 812 && | ||
} | ||
if ( | ||
@@ -22,2 +22,18 @@ // iPhone XR/XS max | ||
} | ||
if ( | ||
// iPhone 12/12 Pro | ||
Ti.Platform.displayCaps.platformWidth === 390 && | ||
Ti.Platform.displayCaps.platformHeight === 844 && | ||
(Ti.Platform.displayCaps.logicalDensityFactor === 2 || Ti.Platform.displayCaps.logicalDensityFactor === 3)) { | ||
return true; | ||
} | ||
if ( | ||
// iPhone 12 Pro max | ||
Ti.Platform.displayCaps.platformWidth === 428 && | ||
Ti.Platform.displayCaps.platformHeight === 926 && | ||
(Ti.Platform.displayCaps.logicalDensityFactor === 3)) { | ||
return true; | ||
} | ||
} | ||
@@ -30,5 +46,3 @@ | ||
} | ||
init(); | ||
// exporting init function. There is no need to call this | ||
@@ -35,0 +49,0 @@ // unless you want to re-evaluate properties. (which shouldn't be needed at all) |
4309
44