How to break on message from debugger "Calling request access completion handler..."

I am trying to find what code is generating this message on Xcode console when debugging a Mac app on MacOS Sonoma:

Calling request access completion handler with no access because this method is deprecated and the app is not a legacy app.

I tried to break on NSLog but this message apparently is not logged with NSLog because when I break on NSLog none of the messages returned have this text.

Does anybody have an idea how could I debug this?

Things I've tried:

  1. Break on NSLog
  2. Break on Swift Error
  3. Break on All Objective-C exceptions

None of these work, as no breakpoint is hit when this message comes up.

Do you use eventStore.requestAccess() ? Or such type of API ?

If so, have a look here, it is a permission issue: https://stackoverflow.com/questions/77185358/requestaccesstoentitytypecompletion-has-been-deprecated-calling-this-is-no-lon

Could you post the code where the error occurs ?

Thanks for the reply. Yes, you were on the mark. This was a warning that if you are running on macOS Sonoma you must use the new API requestFullAccessToEvents(completion:) or you won't have access to Calendar database.

How to break on message from debugger "Calling request access completion handler..."
 
 
Q