Skip to content

iOS/iPadOS detected as Mac OS #417

@tpetry

Description

@tpetry

There's a problem detecting iPads with iPad OS (>= 13.x) and any iOS version when requesting the desktop site.

The user agent of normal iOS ipads is looking like this (correctly recognized):
Mozilla/5.0 (iPad; CPU OS 12_4_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148

But when requesting the desktop site (with iOS 12) or iPad OS 13 this user agent is transmitted:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Safari/605.1.15

So ua-parser is seeing the Mac OS X information in the user agent and no longer any iPad information so the user agent is wrongly identified as desktop Mac OS X client.

But as you can see, the real MacOS user agent is a little bit different:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/605.1.15 (KHTML, like Gecko)

The Version/x.y.z information is only present for iOS/iPadOS devices, not for MacOS X devices. But sadly the differentiation from iOS (smartphone) to iPad OS (tablet) is not possible. But maybe it could transport the information that it's an mobile device requesting the desktop site? Because most often it will be an iPadOS because it's now requesting it on default, for iOS the user has to request the desktop site manually everytime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions