-
-
Save directionforward/28536cffd57ac3dafdd43aa0a9e44b2d to your computer and use it in GitHub Desktop.
JavaScript: How to detect if device is iOS?
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
var isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; | |
if (isIOS) { | |
console.log('This is a IOS device'); | |
} else { | |
console.log('This is Not a IOS device'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment