When using the Xcode 8+ and creating a new blank project, the following logs appear when running the application:
2016-06-13 16:33:34.406093 TestiOS10[8209:100611] bundleid: com.appc.TestiOS10, enable_level: 0, persist_level: 0, propagate_with_activity: 0
2016-06-13 16:33:34.406323 TestiOS10[8209:100607] Created DB, header sequence number = 248
2016-06-13 16:33:34.409564 TestiOS10[8209:100611] subsystem: com.apple.UIKit, category: HIDEvents, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0
2016-06-13 16:33:34.504117 TestiOS10[8209:100607] Created DB, header sequence number = 248
2016-06-13 16:33:34.548023 TestiOS10[8209:100607] subsystem: com.apple.BaseBoard, category: MachPort, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0
2016-06-13 16:33:34.568458 TestiOS10[8209:100608] subsystem: com.apple.FrontBoard, category: Common, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0
Maybe someone already found a configuration for this to handle?
This is no longer an issue in xcode 8.1 (tested Version 8.1 beta (8T46g)). You can remove the
OS_ACTIVITY_MODE
environment variable from your scheme.https://developer.apple.com/go/?id=xcode-8.1-beta-rn
Building on the original tweet from @rustyshelf, and illustrated answer from iDevzilla, here's a solution that silences the noise from the simulator without disabling NSLog output from the device.
OS_ACTIVITY_MODE didn't work for me (it may have been because I typo'd
disable
asdisabled
, but isn't that more natural?!?), or at least didn't prevent a great deal of messages. So here's the real deal with the environment variables.https://llvm.org/svn/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
So setting
OS_ACTIVITY_DT_MODE
to "NO" in the environment variables (GUI method explained in Schemes screenshot in main answer) makes it work for me.As far as
NSLog
being the dumping ground for system messages, errors, and your own debugging: a real logging approach is probably called for anyway, e.g. https://github.com/fpillet/NSLogger .OR
Drink the new Kool-Aid: http://asciiwwdc.com/2016/sessions/721 https://developer.apple.com/videos/play/wwdc2016/721/ It's not surprising that there are some hitches after overhauling the entire logging API.
ADDENDUM
Anyway,
NSLog
is just a shim:https://developer.apple.com/library/content/releasenotes/Miscellaneous/RN-Foundation-OSX10.12/
Only makes sense now to quote the source for the other env variable. Quite a disparate place, this time from Apple internals. Not sure why they are overlapping. [Incorrect comment about
NSLog
removed][Edited 22 Sep]: I wonder what "release" and "stream" do differently than "debug". Not enough source.
https://github.com/macosforge/libdispatch/blob/8e63547ea4e5abbfe55c0c3064181c4950a791d3/src/voucher.c
Please find the below steps.
CMD + <
Run
option from left side.For more information please find the below GIF representation.
Try this:
1- From Xcode menu open: Product > Scheme > Edit Scheme
2- On your Environment Variables set
OS_ACTIVITY_MODE
=disable