How to check if iOS version is lower than iOS 16 using navigator.userAgent in javascript

Viewed 28

I'm trying to check iOS version by using Javascript, I have this condition

  if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) {
      //true
  }

and the result is ok, but I'm trying to check if iOS version is lower than 16, how can I do it?

I'm trying to avoid navigator.appVersion because is depreciated

0 Answers
Related