0

I am trying to identify iPad devices by using various methods in JS. As per the latest research on this, newer versions of iPad Pro behaving same as desktop versions(Same user agent). Since both iPad and Mac shows same user agent details, it's very difficult to differentiate iPad and Mac devices.

Can anyone help on this?

Thanks in advance

Sibin Joy
  • 1
  • 2
  • Usually there are better ways to design your responsive site/app than trying to identify the particular device. For more details you can refer to this [article](https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent) – tromgy Nov 26 '21 at 13:55
  • Please provide enough code so others can better understand or reproduce the problem. – Community Dec 01 '21 at 08:50

1 Answers1

0

You can try this way:

var isIPadPro = /Macintosh/.test(navigator.userAgent) && 'ontouchend' in document;
Pasquale De Lucia
  • 190
  • 1
  • 1
  • 12