iOS 7 Safari 사용자 에이전트를 결정하는 가장 좋은 방법은 무엇입니까? (What is the best way to determine iOS 7 Safari user agent?)


문제 설명

iOS 7 Safari 사용자 에이전트를 결정하는 가장 좋은 방법은 무엇입니까? (What is the best way to determine iOS 7 Safari user agent?)

iOS 7 버전의 Safari에만 존재하는 스타일 문제가 있습니다. 사용자가 CSS 미디어 쿼리를 사용하여 해당 기기에 있는지 감지하는 방법이나 iOS 7 기기에 대한 정확한 사용자 에이전트가 무엇인지 확인할 수 없습니다.

도움이 있습니까?


참조 솔루션

방법 1:

Just try:

navigator.userAgent.match(/(iPad|iPhone);.*CPU.*OS 7_\d/i)

방법 2:

IPhone/iOS7 user agent string looks like this:

Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53

(by bad_scottAntonio MGuser2773289)

참조 문서

  1. What is the best way to determine iOS 7 Safari user agent? (CC BY‑SA 3.0/4.0)

#ios7 #iphone






관련 질문

iOS 7 Safari 사용자 에이전트를 결정하는 가장 좋은 방법은 무엇입니까? (What is the best way to determine iOS 7 Safari user agent?)

iOS 7, 탐색바가 반투명하지 않습니다... 더보기 탭이 반투명하게 보이는 이유는 무엇입니까? (iOS 7, navigation bar has no translucency... why does More tab look translucent?)

사진 촬영 후 사진 사용 또는 재촬영을 선택할 수 없습니다. (After Taking Picture cannot select Use Photo or Retake)

구문 분석 문제: 'stringByAppendingFormat' 모듈을 찾을 수 없습니다. (Parse Issue: Module 'stringByAppendingFormat' not found)

탐색 컨트롤러로 보기로 돌아가기 위해 자동 제스처를 끄는 방법은 무엇입니까? (How to turn off the automatic gesture to go back a view with a navigation controller?)

IOS 7 + 강제 컨트롤러의 경우 세로 방향 (IOS 7 + For force controller Orientation to Portrait)

Phonegap 앱은 iOS7에서 실행되지 않습니다. (Phonegap App doesn't run on iOS7)

UITableViewCellStyle2 색조 색상 설정 (Setting UITableViewCellStyle2 Tint Color)

iOS - flexbox 내부에 입력 요소가 있는 부동 커서 (iOS - Floating cursor with input elements inside flexbox)

UITableView는 iOS 7에서 작동하지만 iOS 8에서는 깨져 보입니다. (UITableView works in iOS 7 but appears crushed in iOS 8)

핵심 데이터 튜토리얼 (Core data tutorial)

StoryBoard를 사용하여 UITableViewCell 내부에 collectionView를 빠르게 빌드하는 방법 (How to use StoryBoard quick build a collectionView inside UITableViewCell)







코멘트