Created
September 11, 2013 18:46
-
-
Save kosso/6528020 to your computer and use it in GitHub Desktop.
Titanium test for iOS versioning
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isiOSVersionOrHigher(major_version) | |
{ | |
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 >= major_version) | |
{ | |
return true; | |
} | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment