公式の KitchenSink ではこうして処理していた。
1 2 3 4 5 6 7 8 9 10 11 | isiOS7Plus = -> # add iphone specific tests if Titanium.Platform.name == 'iPhone OS' version = Titanium.Platform.version.split "." major = parseInt version[0], 10 # can only test this support on a 3.2+ device if major >= 7 return true return false |
SOURCE: https://github.com/appcelerator/KitchenSink/blob/master/Resources/etc/version.js