naver / egjs-agent

Extracts browser and operating system information from the user agent string or user agent object(userAgentData).
https://naver.github.io/egjs-agent/
MIT License
110 stars 18 forks source link

ipad / ios 14버전 #42

Closed changdongchun closed 2 years ago

changdongchun commented 3 years ago

Description

iPad에서 os13 이상 인 경우 일부 사용자 들에게 user-agent 에 iPad 문자열이 빠지며 맥북 사용자와 동일한 user-agent 로 표기 되고 있는데 이를 모바일로 인식하기 위해서는 별도 구분값이 있을까요?

Steps to check or reproduce

daybrush commented 3 years ago

@changdongchun

안녕하세요. iPad OS 13부터 PC 웹 사이트 요청이 기본값입니다. 그렇기 때문에 iPad의 PC 버전 userAgent는 mac의 userAgent와 동일하고 navigator의 속성들도 마찬가지이기 때문에 iPad경우 mac으로 구분됩니다.

mac safari에서는 아직 touch관련이 없기 때문에 iOS를 구분하는 방법은 touch관련 속성이 있는지 확인하는 방법이 있습니다.

 !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0;
changdongchun commented 3 years ago

감사합니다.

stale[bot] commented 3 years ago

This issue/PR has been automatically marked as stale because it has not had any update (including commits, comments, labels, milestones, etc) for 30 days. It will be closed automatically if no further update occurs in 7 day. Thank you for your contributions!

한글 이 이슈/PR은 commits, comments, labels, milestones 등 30일간 활동이 없어 자동으로 stale 상태로 전환되었습니다. 이후 7일간 활동이 없다면 자동으로 닫힐 예정입니다. 프로젝트 개선에 기여해주셔서 감사합니다.