Page 1 of 1

IOS device detection

Posted: Wed Apr 15, 2015 1:18 pm
by jurijus01
Is there a way to get "is_ios" parameter with WURFL.js like here http://wurfl.sourceforge.net/php_index.php

Now i use this JS function to check:

Code: Select all

/(iPad|iPhone|iPod)/g.test(WURFL.complete_device_name)

Re: IOS device detection

Posted: Wed Apr 15, 2015 1:43 pm
by Elliotfehr
Hello,

This capability is not currently available with WURFL.js BE, however if you would like to target iOS devices you can use the `advertised_device_os` capability. For example:

Code: Select all

WURFL.is_ios = (function() {
    if (WURFL.advertised_device_os == 'iOS') {
        return true;
    }
    return false;
})()

Re: IOS device detection

Posted: Thu Apr 16, 2015 3:01 am
by jurijus01
Thanks!