node-mac-permissions icon indicating copy to clipboard operation
node-mac-permissions copied to clipboard

getMediaAccessStatus returns not-determined if permission was set through script

Open has-n opened this issue 3 years ago • 0 comments

I'm setting up CircleCI to run automated tests for my app which uses the microphone. CircleCI runs Mac tests on an image with SIP disabled and injects permissions into the TCC.db. The command is add-permission : source

Using the list-permissions command, I am able to confirm that the app does have the correct permission:

`client service auth_value


com.apple.Terminal kTCCServiceDeveloperTool 0
/usr/sbin/sshd kTCCServiceAppleEvents 2
/usr/sbin/sshd kTCCServiceAppleEvents 2
/usr/libexec/sshd-keygen-wrapper kTCCServiceAppleEvents 2
/usr/libexec/sshd-keygen-wrapper kTCCServiceAppleEvents 2
/usr/libexec/sshd-keygen-wrapper kTCCServiceAccessibility 2
APP.BUNDLE.IDENTIFIER kTCCServiceAll 2 `

When testing for the permission using systemPreferences.getMediaAccessStatus, the result is always not determined.

has-n avatar Jul 22 '22 08:07 has-n