Language/iOS,AOS

iOS/Xcode 14X/오류 - This method should not be called on the main thread as it may lead to UI unresponsiveness

건담아빠 2023. 1. 19. 16:01

 

WKWebView를 띄웠더니 난데없이 아래의 에러가 발생하였다.

다음에 찾기 어려울수 있으니 기록해 두자.

 

This method should not be called on the main thread as it may lead to UI unresponsiveness.

 

메인 스레드에서 WKWebView의 로드 요청을 사용 중일 수 있기 때문이라고 한다. 

 

대부분 의견들이 Xcode 다음버전에서 개선될 가능성이 크다고 한다.

admob에서도 애플이랑 커뮤니케이션 중이라고 하고 원인 분석중이라고 경고 메세지는 무시하면 된다고 한다.

무시하고 일단 작업하자!

 

 

참조

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

 

This method should not be called o… | Apple Developer Forums

I've just tried the DispatchQueue.main.async "workaround" using the production release of Xcode 14.1, and the problem persists. Furthermore, if using a WKWebView in an app where multiple windows can be shown, (i.e. iPad or Mac), then closing a window holdi

developer.apple.com

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

 

Xcode 14 & iOS 16 purple warni… | Apple Developer Forums

Same purple warning in Xcode 14 here. "This method should not be called on the main thread as it may lead to UI unresponsiveness." In my case I've traced it to a WKWebView -> loadRequest:, i.e. called from my main ViewController's -> viewDidLoad: I load a

developer.apple.com

https://developer.apple.com/forums/thread/712074?answerId=730526022#730526022 

 

"UI unresponsiveness" warning on @… | Apple Developer Forums

The purple warning is calling attention to a runtime issue that may impact the performance of your app. In general, you should resolve these issues when they are in your code, by moving the code off the main thread. When you receive one of these runtime pe

developer.apple.com

 

https://groups.google.com/g/google-admob-ads-sdk/c/QQLDBQlO340

 

Xcode: Method called om main thread causing unresponsiveness

If you find the issue is pointing at an Apple framework, please use Feedback Assistant to open a bug report to let us know, and include the complete backtrace shown in the issue navigator. You can post the FB numbers to this thread for visibility. Further,

groups.google.com

https://developers.google.com/admob/ios/rel-notes

 

릴리즈 노트  |  iOS  |  Google Developers

이 페이지는 Cloud Translation API를 통해 번역되었습니다. Switch to English 릴리즈 노트 컬렉션을 사용해 정리하기 내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요. 버전 개봉일/방영일 메모 9.1

developers.google.com

https://ads-developers.googleblog.com/search/label/admob_sdk

 

Google Ads Developer Blog

The official blog for information about the Google Ads, Google Ad Manager, Google Mobile Ads SDKs for AdMob and IMA SDKs, and other Google Advertising Platform developer tools.

ads-developers.googleblog.com