20

When update to iOS 11, after run app in iPhone, I receive this message in Xcode console:

SibDiet[924:111682] refreshPreferences: HangTracerEnabled: 0
SibDiet[924:111682] refreshPreferences: HangTracerDuration: 500
SibDiet[924:111682] refreshPreferences: ActivationLoggingEnabled: 0 ActivationLoggingTaskedOffByDA:0

And now I get this message in every simulator and app.

How can I solve this problem?

Pang
  • 9,564
  • 146
  • 81
  • 122
amin
  • 481
  • 5
  • 13

3 Answers3

22

You can hide this message with click left mouse button on your target, and next Edit Scheme.

hide

After that in section Environment Variables create variable with name OS_ACTIVITY_MODE and value disable as on the picture below.

enter image description here

Kris Dude
  • 388
  • 3
  • 10
7

At this point, there are no data to suggest that you need to respond to this spewing of internal debugger status. BTW, these messages also appear when developing on physical devices, not just simulators.

The prior answer of disabling the Xcode Environment Variable OS_ACTIVITY_MODE will stop all such internal system messages with the unfortunate side effect of turning off console logging from NSLog() calls in ObjC. I have not checked, but it may also disable Swift print() logging.

The Xcode team should really discriminate between disabling system logging and user logging!

jscs
  • 63,694
  • 13
  • 151
  • 195
BlueskyMed
  • 765
  • 7
  • 24
1

It seems the (refresh preferences...) problem appears on multiple platforms.

I managed to fix it on High Sierra(10.13.1) XCode 9.1 and with iOS 11.0.3 by defining OS_ACTIVITY_MODE as disable by going in XCode via

Product > Scheme > Edit Scheme > Arguments > Environment Variables

add OS_ACTIVITY_MODE disable

schema editor (fragment)

Note: NSLog may not work after doing this.

Similar issue is reported in the question:

How to fix refreshPreferences Message in Xcode 9 [duplicate]

Community
  • 1
  • 1
matrix3003
  • 386
  • 3
  • 9
  • 1
    Yes, as noted, this will turn off the console logging of internal messages from the system, but at the expense of disabling NSLog and Print. In many cases, this is too high a price to pay for ignoring junk or noise from the system. – BlueskyMed Nov 17 '17 at 18:27
  • Thanks, I agree. Let Apple give a comprehensive solution... Anyway I will look more into this, NSLog pisses me off too. – matrix3003 Nov 17 '17 at 19:46