1

This simple code that I want to observe the body calculation doesn't work:

struct ContentView: View {
    @State var isOn = false
    var body: some View {
        print("MainView body")
        
        return Toggle("Toggle", isOn: $isOn)
    }
}

When I toggle the Toggle I'm getting errors:

On iOS:

[5502:364282] invalid mode 'kCFRunLoopCommonModes' provided to CFRunLoopRunSpecific - break on _CFRunLoopError_RunCalledWithInvalidMode to debug. This message will only appear once per execution.

On macOS:

[5522:365624] Metal API Validation Enabled
[5522:365624] Unable to locate MetalPluginName property or is of the wrong type
[5522:365624] +[MTLIOAccelDevice registerDevices]: Zero Metal services found

What am I doing wrong?

cluelessCoder
  • 948
  • 6
  • 19
  • https://stackoverflow.com/questions/56980875/what-does-invalid-mode-kcfrunloopcommonmodes-mean – Shadowrun Jul 12 '21 at 10:21
  • Does this answer your question? [What does "invalid mode 'kCFRunLoopCommonModes' ..."mean?](https://stackoverflow.com/questions/56980875/what-does-invalid-mode-kcfrunloopcommonmodes-mean) – G. Marc Feb 27 '22 at 06:08

0 Answers0