Created
November 17, 2019 17:00
-
-
Save codearryaas/d6bc868d9f545b7d658235128fb595af 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