I need to detect user IOS/Safari version and if its below 15 do not render some content for him, cause it doesn't support under 15 versions
I've tried to use
navigator.userAgent
So i see in the console the Safari version, but not quiet understand how to check if it 15 or below
I think i find solution For me works well:
const [ifSafariSupportedAr, setIfSafariSupportedAr] = useState(false)
useEffect(() => {
if (navigator.userAgent.includes('Safari/')) {
const array = [...navigator.userAgent.split('Version/')[1]]
const [first, second] = array
const version = first + second
setIfSafariSupportedAr(+version >= 15)
}
}, [])