I have Cocoa application where I need to ask for recording and accessibility permission. I am seeing that only first feature asking for permissions shows its popup.
E.g If I put first code to ask for recording screen permission I dont see accessibility and in the Security and Privacy my app appears as I had rejected permission
Same happens on the other way around.
This is the code to request screen recording:
CGDisplayStreamRef stream =
CGDisplayStreamCreate(CGMainDisplayID(), 1, 1, kCVPixelFormatType_32BGRA, nil,
^(CGDisplayStreamFrameStatus status, uint64_t displayTime, IOSurfaceRef frameSurface, CGDisplayStreamUpdateRef updateRef) {
Q_UNUSED(status) Q_UNUSED(displayTime) Q_UNUSED(frameSurface) Q_UNUSED(updateRef) });
if (stream)
CFRelease(stream);
And this is the code for accessibility
NSDictionary *options = @{(id)kAXTrustedCheckOptionPrompt: @YES};
Boolean accessibilityEnabled = AXIsProcessTrustedWithOptions((CFDictionaryRef)options);
How can I fix this, please?
Thanks in advance and regards