0

I see some message in my console when I run this code. The issue only appears on macOS and the code works fine for iOS with no message. What does this message mean?

macOS: 12.3 - intel CPU and Xcode: Version 13.2.1 (13C100)

struct ContentView: View {
    @State private var value: CGFloat? = 0.1
    var body: some View {
        Circle()
            .frame(width: 200.0, height: 200.0)
            .customOpacity(value)
            .animation(.linear(duration: 5), value: value)
            .onAppear(perform: { value = 1.0 })
    }
}

extension View {
    @ViewBuilder func customOpacity(_ value: CGFloat?) -> some View {
        if let unwrappedValue: CGFloat = value { self.opacity(unwrappedValue) }
        else { self }
    }
}

opa[2319:80386] [] [0x7f954a02dc20] CVCGDisplayLink::setCurrentDisplay: 69989200
opa[2319:80386] [] [0x7f954a02dc00] CVDisplayLinkCreateWithCGDisplays count: 1 [displayID[0]: 0x42bf350] [CVCGDisplayLink: 0x7f954a02dc20]
opa[2319:80386] [] [0x7f954a02dc00] CVDisplayLinkStart
opa[2319:80386] [] [0x7f954a02dc20] CVDisplayLink::start
opa[2319:80882] [] [0x6000009a0af0] CVXTime::reset
opa[2319:80854] [] [0x7f954a02dc20] CVCGDisplayLink::finalize
opa[2319:80854] [] [0x7f954a02dc20] CVCGDisplayLink::finalize stopping
opa[2319:80854] [] [0x7f954a02dc20] CVDisplayLink::stop
opa[2319:80854] [] [0x7f954a02dc20] CVDisplayLink::finalize
ios coder
  • 1
  • 4
  • 31
  • 91
  • Most likely irrelevant logging from the system. – jnpdx Mar 22 '22 at 02:21
  • Did you plug/unplug any displays while your app was running? – Alexander Mar 22 '22 at 02:24
  • @Alexander: No, did you run the code? I am getting the massage even now after new build or restart OS. – ios coder Mar 22 '22 at 09:22
  • @jnpdx: Are you getting the massages as well? – ios coder Mar 22 '22 at 09:23
  • 1
    @iosDev No, I didn't have the time, it's just a shot in the dark. Have you seen https://stackoverflow.com/q/70275211/3141234 ? – Alexander Mar 22 '22 at 13:26
  • @Alexander: Thanks, that link solved the issue, doing that is safe? Are we killing other important message with this action? Also I am thinking maybe it is because of intel cpu, i am using a mac powered with intel cpu, if you could please run my code, and say if you getting same output, I want to know if it is a general thing or may I need a fresh install. – ios coder Mar 22 '22 at 14:01
  • 1
    "Thanks, that link solved the issue, doing that is safe? Are we killing other important message with this action?" I have no idea, but it's a promising direction that warrants further reading. I can try this out some time on the weekend, if i have time – Alexander Mar 22 '22 at 14:04

0 Answers0