Search code examples
uiswitchxcode11

What does "invalid mode 'kCFRunLoopCommonModes' ..."mean?


Environment: Version 11.0 beta 3 (11M362v)

Here's the full text:

invalid mode 'kCFRunLoopCommonModes' provided to CFRunLoopRunSpecific - break on _CFRunLoopError_RunCalledWithInvalidMode to debug. 
This message will only appear once per execution.
Hello World

This message only appears when I click on a UISwitch button that is connected to an action; here, printing "Hello World".

Apparently the behavior of the action isn't affected.

enter image description here

As a comparison, I've created a UIBarButtonItem in the toolbar which behaves normally. So there's something fishy about the switch button.

Question: why would this appear and what does it mean? Remedy?


Solution

  • I think it's a warning that Apple should fix it itself. Even in this sample project which is from WWDC19 this problem exists. There is a UISwitch in a cell of a table. When I tap it, the mentioned warning is raised.

    So, in my view, it is a bug that Apple should deal with.