How can I detect IOS version with server code at cshtml?

411 views Asked by At

My question is about detecting ios version from server-side. Based on ios version , I will change content at cshtml. I want to check if the version is greater or equal to ios13.

Pseudo code is like this

var isIphone = ....
var iosversion = ....

if(isIphone && iosversion >= 13)
.....

I found this code

var userAgent = Request.UserAgent.ToString().ToLower();

and it retuns like below

mozilla/5.0 (iphone; cpu iphone os 13_2 like mac os x) applewebkit/605.1.15 (khtml, like gecko) version/13.0.3 mobile/15e148 safari/604.1

0

There are 0 answers