14

Ive just updated to the new Xcode 8, but when i run my application it give lots of console information "only when i plug an iOS +10 device or iPhone 7 simulator" but does not show the desired log because of the new information that the logs shows such as:

nw_endpoint_handler_cancel
nw_resolver_cancel_on_queue
tcp_connection_cancel
sa_dst_compare_internal

How to disable those things?

Mutawe
  • 6,464
  • 3
  • 47
  • 90

1 Answers1

26

This question is answered here

Just set an environment variable OS_ACTIVITY_MODE = disable in your debug scheme. For reference see the image below

enter image description here

Community
  • 1
  • 1
Asad Ali
  • 511
  • 1
  • 8
  • 13
  • I saw this answer on twitter, but i couldn't find the "environment variable" – Mutawe Sep 20 '16 at 06:24
  • 1
    @Mutawe, have a look at this [picture](http://i.stack.imgur.com/p7BlV.png). From Xcode menu open: Product > Scheme > Edit Scheme – Asad Ali Sep 20 '16 at 10:05
  • 1
    This solution will hide all NSLog starting with Xcode 9. To keep NSLog, replace `disable` with `default`. – Cœur Sep 27 '17 at 19:12