Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Device type set to :desktop for iOS simulator iPhone device #13

Open
tjhanley opened this issue Feb 6, 2014 · 0 comments
Open

Device type set to :desktop for iOS simulator iPhone device #13

tjhanley opened this issue Feb 6, 2014 · 0 comments

Comments

@tjhanley
Copy link

tjhanley commented Feb 6, 2014

I am using the iOS simulator for ease of use and speed. Mobvious is detecting the simulator's user agent correctly but request.env['mobvious.device_type'] is being set as :desktop

Debug code

Rails.logger.debug("USER AGENT: #{request.user_agent}")
Rails.logger.debug("Mobvious browser: #{browser}")
Rails.logger.debug("Mobvious device type: #{request.env['mobvious.device_type']}")

Physical iPhone

USER AGENT: Mozilla/5.0 (iPhone; CPU iPhone OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11B554a Safari/9537.53
Mobvious browser: iphone ios mobile modern mac safari safari7 webkit
Mobvious device type: mobile

iOS Simulator (Version 7.0 (463.9.4.2))

USER AGENT: Mozilla/5.0 (iPhone; CPU iPhone OS 7_0_3 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11B508 Safari/9537.53
Mobvious browser: iphone ios mobile modern mac safari safari7 webkit
Mobvious device type: desktop

I looked into MobileESP Gem and it looks to be detecting the user_agent correctly

Note

It does appear to be detecting :tablet correctly for iOS iPad simulator

USER AGENT: Mozilla/5.0 (iPad; CPU OS 7_0_3 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11B508 Safari/9537.53
Mobvious browser: ipad ios modern mac safari safari7 webkit
Mobvious device type: tablet
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant