Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 extension of logs it produces a default environment.

4   TestApp                             0x0000000101c262e0 __39-[ViewController viewDidLoad]_block_invoke + 196
5   libdispatch.dylib                   0x0000000102279654 _dispatch_call_block_and_release + 24
6   libdispatch.dylib                   0x0000000102279614 _dispatch_client_callout + 16
7   libdispatch.dylib                   0x0000000102289008 _dispatch_queue_serial_drain + 716
8   libdispatch.dylib                   0x000000010227ce58 _dispatch_queue_invoke + 340
9   libdispatch.dylib                   0x000000010228a1c4 _dispatch_root_queue_drain_deferred_wlh + 412
10  libdispatch.dylib                   0x00000001022917fc _dispatch_workloop_worker_thread + 868
11  libsystem_pthread.dylib             0x00000001ac6771e8 _pthread_wqthread + 924
12  libsystem_pthread.dylib             0x00000001ac676e40 start_wqthread + 4
like image 675
iPC Avatar asked Jun 13 '17 05:06

iPC


1 Answers

If these reporting messages confuse you uncheck them:

  1. Edit Scheme...enter image description here
  2. Uncheck "Main Thread Checker" in Run > Diagnostics enter image description here
like image 131
CGN Avatar answered Oct 27 '22 01:10

CGN