Created
January 31, 2014 20:24
-
-
Save danlynn/8742360 to your computer and use it in GitHub Desktop.
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
/** | |
* @returns {boolean} true if this is an iOS device running 'version' or greater | |
*/ | |
function is_iOS_app_gte(version) { | |
return typeof window.device != "undefined" && window.device.platform == "iOS" && is_version_gte(window.device.version, version); | |
} | |
/** | |
* Is this an Apple iOS device and running version 7.0 or greater? | |
* @returns {boolean} | |
*/ | |
function is_iOS_app_gte(version) { | |
var d = window.device; | |
if(typeof d != "undefined"){ // this checks if it's an app vs mobile site | |
if( d.platform == "iOS" ){ | |
return is_version_gte(d.version, version); | |
} | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment