Can I give my Mac (non-AppStore) app the entitlement to allow screenshare?

I have a Mac application (codesigned but not distributed through the Mac AppStore, so not sandboxed) that has screenshare capabilities. Since Catalina (Mojave?) this requires the user to open System Preferences > Security > Privacy and enable screen sharing, and separately to enable accessibility (to allow remote users mouse/keyboard control).


The question: is there a more seamless way to get these permissions? Can I add them to my entitlements.plist (used by codesign)? This isn't working, probably because they are private apple entitlements?


The current situation is that our customers may or may not see a pop-up directing them to sys prefs, and if they do they don't understand what to do. So we're getting a lot of support tickets.


Regards,

Tom

Accepted Reply

is there a more seamless way to get these permissions?

No. The entire goal of this feature is to have the user explicitly approve such requests.

The only exception here is if you’re deploying to a managed environment, in which case the system admin can pre-approve these requests by installing a configuration profile with the Privacy Preferences Policy Control payload (

com.apple.TCC.configuration-profile-policy
).

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Replies

It is supposed to ask the user to allow these permissions automatically. See this section of the "Advanced in macOS Security" session.

is there a more seamless way to get these permissions?

No. The entire goal of this feature is to have the user explicitly approve such requests.

The only exception here is if you’re deploying to a managed environment, in which case the system admin can pre-approve these requests by installing a configuration profile with the Privacy Preferences Policy Control payload (

com.apple.TCC.configuration-profile-policy
).

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"