AQDefaultDevice Bug Alive and Well in Xcode 8.3

Xcode 8.3.2 has been released today and a fairly serious bug that Apple introduced in Xcode 8.0 that will drive you crazy and make tracking debugging messages much more difficult has not been addressed – again. It seems to occur only when running apps on the Simulator where in essence the debugger window is flooded with messages like this:

2017-04-19 18:54:37.943419-0400 ___[4835:195830] [aqme] 254: AQDefaultDevice (173): skipping input stream 0 0 0x0

These strings are generated once per every 500ms and fill up the debug output pane. Not pretty – so here is a brief workaround. There are two steps to this approach. First we are going to add a new environment variable in the  project target’s scheme called OS_ACTIVITY_MODE. The value should be set to ${DEBUG_ACTIVITY_MODE}.  We get a checkbox for the new  variable so it can be turned off easily.

Secondly we are going to add a user-defined build setting in the project target’s build settings (right at the bottom) called DEBUG_ACTIVITY_MODE. Then set the value here to “disable” for “Any iOS  Simulator SDK” in debug.

With this approach debug messages should still be OK when running on an actual device. In general however, there is a caveat as some actual debug messages like those pertaining to auto-layout could be caught in the cross-fire. In our testing in print() and os_log() messages in Swift are showing up OK. Use with care.