Unexpected console messages when initializing a WKWebView

Viewed 1631

Whenever I create a WKWebView object, I've suddenly started getting a series of messages in the console that I've never seen in the past:

WF: === Starting WebFilter logging for process MyApp
WF: _userSettingsForUser : (null)
WF: _WebFilterIsActive returning: NO

This happens even if I just initialize the object without doing anything with it, and setting a breakpoint immediately after it suggests the messages are being generated during the init method:

_ = WKWebView(frame: UIScreen.main.bounds)
/* breakpoint here, messages are already in the console */

When I search for the messages on Google, everything that comes up seems to be related to Admob which I'm not using or other specific cases that don't apply, and most of them are from several years ago but I haven't seen this before today.

What do these messages mean? Can I get rid of them? Note that disabling OS_ACTIVITY_MODE is not an option, I don't want to just hide everything.

After further testing, this seems to only happen in iOS 13.4 or later, but I can't find any release notes or anything about it so I'm not sure whether it's a bug or part of a new feature. I still want to be able to get rid of it either way though.

1 Answers

This log messages seem to be not very relevant for you. Like in this thread eskimo described it as log noise.

I couldn't find any option to disable this kind of message, except disabling OS_ACTIVITY_MODE:

  1. Select Product => Scheme => Edit Scheme or use shortcut : CMD + <
  2. Select the Run option from left side.
  3. On Environment Variables section, add the variable OS_ACTIVITY_MODE = disable
Related