0

Why ScrollView shows event logs in console?

ScrollView {
     VStack(alignment: .leading, spacing:0) {
          HStack{
              Text("ScrollView Testing").font(.largeTitle)
              Spacer()
          }
     }
}

Logs

Evaluating dispatch of UIEvent: 0x600003909ad0; type: 0; subtype: 0; backing type: 11; shouldSend: 1; ignoreInteractionEvents: 0, systemGestureStateChange: 0

Is this behavior normal or something messing up with UIEvent? I am new to ScrollView.

HangarRash
  • 7,314
  • 5
  • 5
  • 32
shoji
  • 103
  • 3
  • 2
    Hello, this is not something to worry about, they’re just internal logs from the iOS system. – Phobos Aug 02 '23 at 05:35
  • @Phobos I too am having this pop up on mine as well. Is there any way to filter or stop this information out? Seems kinda pointless and makes it hard to debug my other stuff. – pmac89 Aug 03 '23 at 15:23

1 Answers1

1

Edit the scheme, and under Run, select Arguments, and add the following under Environment Variables:

Name: OS_ACTIVITY_MODE, Value: disable

Hide strange unwanted Xcode logs

https://developer.apple.com/forums/thread/63277

I've had to do the same with Xcode 15 betas, but it didn't appear in Xcode 14.

EDIT: spelling.

XeoKeri
  • 40
  • 2
  • 6
  • 2 things – 1: It should be `disable`, not `disabled`; 2: Be cautious with this, as it's well documented in the answers of https://stackoverflow.com/questions/37800790/hide-strange-unwanted-xcode-logs that this solution also hides all NSLog output to the console. – adamjansch Aug 14 '23 at 11:48
  • @adamjansch Correct, it should be `disable`, but you should be using `OSLog` instead of `NSLog` or `print`. – XeoKeri Aug 14 '23 at 20:39