IOS device detection

For those who like to stay on the client
jurijus01
Posts: 2
Joined: Wed Apr 15, 2015 1:13 pm

IOS device detection

Postby jurijus01 » Wed Apr 15, 2015 1:18 pm

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)

Elliotfehr

Re: IOS device detection

Postby Elliotfehr » Wed Apr 15, 2015 1:43 pm

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;
})()

jurijus01
Posts: 2
Joined: Wed Apr 15, 2015 1:13 pm

Re: IOS device detection

Postby jurijus01 » Thu Apr 16, 2015 3:01 am

Thanks!


Who is online

Users browsing this forum: No registered users and 2 guests