It seems to be general consensus that every mobile apple device, iphone, ipad, or ipod uses a user agent that contains both Mobile and Safari .
However, using the latest SDK (4.0.1) and reading the user agent on my rails server (using request.env["HTTP_USER_AGENT"]
), we never get the Safari part.
No matter whether the request is being made from the simulator or a real device, debug or release, it always looks something like this:
Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_1_2 like Mac OS X; de-de)
AppleWebKit/528.18 (KHTML, like Gecko) Mobile/7D11"
Just no Safari . :-( So we have to use the iPhone part to be sure. That is something apple does not recommend doing.