Cannot get selected text working on macOS 15.0 beta with Swift

Code: https://github.com/nikitavoloboev/macos-app-selected-text

No matter what I try, on latest macOS 15, I cannot get selected text copied. I give right permissions to the debug build of the app and still. I can’t get it to work.

Only happens on latest macOS 15.

Cannot get selected text working on macOS 15.0 beta with Swift
 
 
Q