NSLog not printing to console

后端 未结 7 884
渐次进展
渐次进展 2020-12-13 17:38

I have an Xcode project I\'ve been working on for months. I\'ve never had a problem with NSLog, but after upgrading to Xcode 4.2 nothing will log to the console. I even trie

7条回答
  •  死守一世寂寞
    2020-12-13 17:51

    In iOS10, a lot of system logging is displayed on the console. This can be disabled by including the OS_ACTIVITY_MODE = disabled in the Run Arguments for your scheme

    However for iOS10, NSLog messages will not be displayed anymore. In lower iOS versions the messages will still be displayed. So maybe for most test cases you can use a lower iOS version.

    Otherwise you can include a Swift function which prints (print function) your text, this is working okay in iOS10.

    Tested on iOS10.0.2 and iOS9.3

提交回复
热议问题