Is there an entitlement for screen capture on macOS?

I have a macOS app that captures screen images. The first time I run this application, a dialog is shown directing the user to give my app Screen Recording permission. Is there a way I can trigger this dialog earlier and detect whether the permission was granted?

Is there a way I can trigger this dialog earlier … ?

CGRequestScreenCaptureAccess

Is there a way I can … detect whether the permission was granted?

CGPreflightScreenCaptureAccess

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thank you!

our application crashes when running on Mojave 10.15

Indeed. This is a bug (r. 72786842). The functions were supposed to be available on 10.15.x but something went wrong with the way that was implemented. The workaround is to restrict your use of them to macOS 11 and later.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I also meet this bug. Please fix this bug in the next macOS Catalina release.

I do doubt there will be any change in 10.15.

Right. While it’s impossible to predict the future with 100% reliability, I’d be very surprised if this bug were fixed in a future 10.15.x update. In general we only update older OS releases to fix critical security issues, and that’s not the case here.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Is there an entitlement for screen capture on macOS?
 
 
Q