user agent checking for ios6
I am trying to check whether client opening the page is using ios6 or not

    var startIndex = navigator.userAgent.search(/OS/i) + 2;
        var endIndex = navigator.userAgent.search(/like/i);
        var iOSVersion = parseInt(navigator.userAgent.substr(startIndex,endIndex - startIndex).trim());
        this.iOSVersion = true;

        if(!isNaN(iOSVersion)){
            this.iOSVersion = iOSVersion;
        }
        else if(Ext.is.Desktop){
            this.iOSVersion = true;
        }



The above code works well for all the verions, browsers.

But incase of using it in ios6, it shows as ios5. Searched for the same thing, but i didnot find a solution. May be i am still not done with searching for this, doing side by side search and hoping if some one has faced this before.


Any suggestions or updations?

Thanks.
user agent checking for ios6
===

I am trying to check whether client opening the page is using ios6 or not

    var startIndex = navigator.userAgent.search(/OS/i) + 2;
        var endIndex = navigator.userAgent.search(/like/i);
        var iOSVersion = parseInt(navigator.userAgent.substr(startIndex,endIndex - startIndex).trim());
        this.iOSVersion = true;

        if(!isNaN(iOSVersion)){
            this.iOSVersion = iOSVersion;
        }
        else if(Ext.is.Desktop){
            this.iOSVersion = true;
        }



The above code works well for all the verions, browsers.

But incase of using it in ios6, it shows as ios5. Searched for the same thing, but i didnot find a solution. May be i am still not done with searching for this, doing side by side search and hoping if some one has faced this before.


Any suggestions or updations?

Thanks.