윈도우에서 아이패드 크롬 디버깅 설정
Windows OS PC에서 아이패드 크롬 디버깅 설정
- 애플 모바일(iOS, iPadOS) iPad, iPhone(아이폰)에서 Chrome 브라우저로 웹사이트 테스트 설정 방법
------------------------------------------------------------
< 공통 >
* iPad의 Chrome → 설정 → 콘텐츠 설정 → Web Inspector를 켜기
- iPad에서 설정 → 앱 → Safari → 고급 → 웹 속성(Web Inspector) 켜기
- 윈도우 PC와 USB로 연결
* Apple 기기(Apple Devices) 앱 설치
https://apps.microsoft.com/detail/9np83lwlpz9k?gl=KR&hl=ko-KR
- 설치후 실행해서 연결 확인
------------------------------------------------------------
< pymobiledevice3> 이용 <== 추천
https://github.com/doronz88/pymobiledevice3 - 2.9k
- 설치
uv tool install --python 3.12 pymobiledevice3==11.45.1
pymobiledevice3 version
- 기기와 크롬 탭 확인
pymobiledevice3 usbmux list
pymobiledevice3 webinspector opened-tabs --timeout 5
- 브리지 실행
pymobiledevice3 webinspector cdp --udid <기기ID> --host 127.0.0.1 --port 9232
- <기기ID> 는 pymobiledevice3 usbmux list 명령결과에서 "Identifier" 값
- 브라우저로 접속
http://127.0.0.1:9232
- 접속가능한 크롬 탭들이 보인다. 해당 링크들을 새탭으로 열어서 확인
------------------------------------------------------------
- 참고 : 이전 방식이고 불편하고 한계있음
< ios-safari-remote-debug-kit >
https://github.com/HimbeersaftLP/ios-safari-remote-debug-kit - 463
git clone https://github.com/HimbeersaftLP/ios-safari-remote-debug-kit.git
cd ios-safari-remote-debug-kit\src
pwsh -NoProfile -File .\generate.ps1
- 지원 버전 다시 고르기
pwsh -NoProfile -Command '& .\generate.ps1 -FetchWebInspector $false'
- 현재 iPadOS 가 18.7.11 인데 8.4 선택함
- 실행
.\start.ps1
ios-webkit-debug-proxy 가 자동으로 설치됨
Listing devices on :9221
Connected :9222 to ??iPad (xx) <== 가 나오면 성공
- 브라우저로 접속
localhost:8080
- 안되면 다음 링크
http://localhost:8080/Main.html?ws=127.0.0.2:9222/devtools/page/1
------------------------------------------------------------
< playwright >
https://github.com/microsoft/playwright
- playwright 의 webkit 으로 확인하는 방법은 아이패드에서 동일하게 동작할지 장담할 수 없다.
- 수정과정을 눈으로 확인하기가 불편
- 별도 테스트 코드를 작성해서 실행해야 함
# 1. 개발 의존성으로 설치
npm i -D --save-exact playwright
# 2. WebKit 브라우저만 내려받기
npx playwright install webkit
* 버전 확인
npx playwright --version
- webkit 버전 확인
node -e "const {webkit}=require('playwright');webkit.launch().then(async b=>{console.log('WebKit',b.version());await b.close()})"