Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for NSScreenCaptureUsageDescription #113

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

obaid
Copy link

@obaid obaid commented Oct 18, 2024

Adding support for NSScreenCaptureUsageDescription so that my app can capture system audio / screen recording if needed. This needs to be part of build file.

Adding support for NSScreenCaptureUsageDescription
@simonhamp
Copy link
Member

But this doesn't need to be a part of everyone's app...

Instead of making this something that's applied to every app, I'd prefer a mechanism here that allows the developer to choose which grants they're going to need

It could be something that goes in the NativePHP config file

@obaid
Copy link
Author

obaid commented Oct 21, 2024

@simonhamp Happy to help add that ability. If you have any pointers on how to go about it, that would be helpful.

@simonhamp
Copy link
Member

simonhamp commented Oct 21, 2024

@obaid I'm not sure exactly, but I'm thinking perhaps a config key in the config/nativephp.php such as mac_entitlements which contains an array of entitlements, e.g.

'mac_entitlements' => [
    'NSScreenCaptureUsageDescription' => "Application requests access to the user's screen capture and system audio",
]

Then there would need to be some logic in electron-builder.js to fetch the values from the PHP config (e.g. using an Artisan command) and merge them with some defaults (the ones already in the electron-builder.js)

Does this make sense?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants