79650632

Date: 2025-06-03 04:48:28
Score: 1.5
Natty:
Report link

I just ran into this issue. I'm very new to Swift and macOS dev in general but I think the issue is this line:

override class var runsForEachTargetApplicationUIConfiguration: Bool {
        true
    }

I think it is instructing XCTest to try both light and dark (all) modes. This seems to switch the default mode system-wide. I think it may be undocumented behaviour from XCTest.

If you don't need to test both light and dark mode, remove that line and it should just run in whatever environment you have set.

Reasons:
  • RegEx Blacklisted phrase (1.5): I'm very new
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Tom Nowell