CodeIgniter Forums

Full Version: User Agent Class: Mobile iPad Detection Not Working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]axiom82[/eluser]
This works:
Code:
if ($this->agent->is_mobile()) echo 'Yes, a mobile device.';

This doesn't work:
Code:
if ($this->agent->is_mobile('ipad')) echo 'Yes, an iPad mobile device.';

Non-CodeIgniter workaround:
Code:
$is_iPad = (bool) strpos($_SERVER['HTTP_USER_AGENT'],'iPad');
if ($is_iPad) echo 'Yes, an iPad mobile device.';

Is this working in Code Igniter and I am just not seeing it?

Thanks.