SwiftUI console showing CVDisplayLink related messages?

Viewed 741

I'm getting a lot of output on the console as I run a MacOS based SwiftUI app I'm developing, for example:

2021-12-08 12:40:14.439565+0000 SpDriveApp[6801:159299] [] [0x7fe6e7830820] CVCGDisplayLink::setCurrentDisplay: 1892262333
2021-12-08 12:40:14.439785+0000 SpDriveApp[6801:159299] [] [0x7fe6e7830800] CVDisplayLinkCreateWithCGDisplays count: 1 [displayID[0]: 0x70c9a1bd] [CVCGDisplayLink: 0x7fe6e7830820]
2021-12-08 12:40:14.439827+0000 SpDriveApp[6801:159299] [] [0x7fe6e7830800] CVDisplayLinkStart
2021-12-08 12:40:14.439853+0000 SpDriveApp[6801:159299] [] [0x7fe6e7830820] CVDisplayLink::start
2021-12-08 12:40:14.439993+0000 SpDriveApp[6801:182706] [] [0x60000f698460] CVXTime::reset

Has anyone else seen this? Have I accidentally switched on a diagnostic tool, or is there something else I am doing wrong?

2 Answers

I get these messages not because of SwiftUI, but because of a WKWebView, nevertheless this work around may work for both:

Add the 'Environment Variable': OS_ACTIVITY_MODE, with value: disable on Product > Scheme > Edit Scheme > Run > Arguments.

Editing the scheme to add environment variable

There appears to be an alternative, more granular solution to using OS_ACTIVITY_MODE, but this one is global to your macOS installation. I found this on Daniel Jakult's blog Indie Stack:

You can disable these messages by running this in your terminal:

defaults write com.apple.corevideo cv_note 0
Related