I am a complete newbie when it comes to Swift and MacOS development. So apologies, I don't even know what is the right thing to search for.
I have an app which uses ScreenCaptureKit. I had a preview working which showed the different windows available, it initially required me to give my app permissions for screen and system audio recording which I did.
However now whenever I rebuild the app it asks for permission again and fails - despite the permission already being given.
Are you signing your code with a stable signing identity?
The #1 reason for problems like this is folks either not signing their code or signing it ad hoc (Sign to Run Locally in Xcode parlance). That prevents the system from being able to track the identity of the code, so it’s not aware that build N+1 of your app is the ‘same code’ as build N. I talk about this in gory detail in TN3127 Inside Code Signing: Requirements, but in most cases it’s not hard to solve: Change the popup from Sign to Run Locally to Development.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"