// // returns true if iphone/ipad and version is 3.2+ // function isIPhone3_2_Plus() { // add iphone specific tests if (Titanium.Platform.name == 'iPhone OS') { var version = Titanium.Platform.version.split("."); var major = parseInt(version[0],10); var minor = parseInt(version[1],10); // can only test this support on a 3.2+ device if (major > 3 || (major == 3 && minor > 1)) { return true; } } return false; } function isiOS4Plus() { // add iphone specific tests if (Titanium.Platform.name == 'iPhone OS') { var version = Titanium.Platform.version.split("."); var major = parseInt(version[0],10); // can only test this support on a 3.2+ device if (major >= 4) { return true; } } return false; }