비전공자 개발일기

Inspection of Web Content not working with iOS 16.4+ 본문

SWIFT/(SWIFT || Xcode)Error

Inspection of Web Content not working with iOS 16.4+

HiroDaegu 2023. 4. 11. 08:57
728x90
SMALL

문제 상황 

Swift WKWebView를 활용하여 앱을 제작하고 있고, Web Page의 Script나 Tag를 확인하기 위해서 Safari의 개발자용 -> 연결된 기기를 통해서 Web Page를 Debugging 하는 과정에서 문제 발견

 

iOS 16.0.0 (iPhone XR) 환경
iOS 16.4.1(iPhone 11) 환경


해결 방법

if #available(iOS 16.4, *) {
    myWebView.isInspectable = true
}

https://developer.apple.com/documentation/webkit/wkwebview/4111163-isinspectable

 

isInspectable | Apple Developer Documentation

There's never been a better time to develop for Apple platforms.

developer.apple.com

728x90
LIST