Main Thread Checker: UI API called on a background thread: -[UIApplication delegate]

后端 未结 2 1636
囚心锁ツ
囚心锁ツ 2021-01-18 00:47

Xcode 9 seems to be reporting a lot of Main thread calls to UIApplication properties. Even though the UI is not being updated this is particularly cumbersome due to the exte

相关标签:
2条回答
  • 2021-01-18 01:11

    If these reporting messages confuse you uncheck them:

    1. Edit Scheme...
    2. Uncheck "Main Thread Checker" in Run > Diagnostics
    0 讨论(0)
  • 2021-01-18 01:23

    Check also ARKit template Xcode project Main Thread Checker log console.

    If UIApplication or UIApplicationDelegate method is called from another thread you can disable checking thread as in CGN answer, but it will disable this checker completely. You can also subclass what is necessary and call metod of superclass on main thread. This way you can still use Main Thread Sanitizer in other places in code

    0 讨论(0)
提交回复
热议问题