Suyeon9911 / TIL

매일 오전에 적는 미라클 TIL 🥣
11 stars 0 forks source link

[Trouble Shooting] Xcode 14 업뎃 후 WKWebView 띄울 시 디버그 창에 경고 발생 #92

Open Suyeon9911 opened 2 years ago

Suyeon9911 commented 2 years ago

Xcode 14 업뎃 후 iOS 버전 16.0으로 시뮬 돌리고 있는데 웹뷰에 진입할 때 런타임 경고가 뜬다. 요건 처음 보는 녀석인데

2022-09-22 04:22:24.867724+0900 Havit[75969:7209794] [Security] This method should not be called on the main thread as it may lead to UI unresponsiveness. UI 응답없을 수도 있으니까 메인스레드에서 호출하지 말라는뎅...

일단 구글링을 해본다.

다른ㅅ 사람들도 Xcode14 버전에서 나타나는 현상이라고 함. Happening to me too. Someone please solve this....ㅋㅋㅋㅋㅋ

I believe it is happening when WkWebView.load(URLRequest) is called. If I comment out the particular load() call, the warning isn't displayed. 라는데......

image

더 찾아보니까 iOS16에서 발생하는 ㄴ새로운 경고인듯 하다 load 메서드는 메인스레드에서 실행하는게 맞고 다른 큐로 디스패치 하게 될 경우 런타임 충돌이 발생한다고 함.

뇌피셜로 load 메서드를 호출 url request하는 network 작업이 진행되다보니까 이 request가 응답하지 않았을 경우에 UI가 안뜰수 있음을 경고하는게 새로 생긴거 같다..?

https://developer.apple.com/forums/thread/713290

일단 내일 다른 사람들한테 이슈를 공유하고 함 물어봐야게따 ~