I try to run ScreenCaptureKit sample code. That sample require macOS 13.0 for audio capture.
When I run, the app shows with "No screen recording permission". I grant Screen Recording permission on System Settings -> Privacy & Security. But same error happens. I cannot find a way to grant the permission.
I tried restart app, restart Xcode, reboot macOS and
rm -rf ~/Library/Developer/Xcode/DerivedData/CaptureSample-...
This sample app worked after comment out "streamConfig.capturesAudio" and related code on Monterey. This permission issue did not happen on Monterey.
Env: macOS Ventura 13.0, Xcode 14.1(14B47b)
Sample code URL : https://developer.apple.com/documentation/screencapturekit/capturing_screen_content_in_macos?language=objc