From 2ae71facd5e217640dccd32ce2a6e63d6aa4920c Mon Sep 17 00:00:00 2001 From: Ramiro Saenz Date: Thu, 19 Mar 2020 20:34:37 -0300 Subject: [PATCH] Grant camera/microphone permission to macOS Catalina --- app/Application.js | 5 ++--- package.json | 8 ++++---- .../installer/entitlements.mac.plist | 0 3 files changed, 6 insertions(+), 7 deletions(-) rename entitlements.mac.plist => resources/installer/entitlements.mac.plist (100%) diff --git a/app/Application.js b/app/Application.js index 63b2ec06..17dbfe80 100644 --- a/app/Application.js +++ b/app/Application.js @@ -70,15 +70,14 @@ Ext.define('Rambox.Application', { '->' ,{ xtype: 'label' - ,html: 'Rambox Pro needs permissions to use Microphone and Camera for the apps.' + ,html: 'Rambox CE needs permissions to use Microphone and Camera for the apps.' } ,{ xtype: 'button' ,text: 'Grant permissions' ,ui: 'decline' ,handler: async function(btn) { - await require('electron').remote.systemPreferences.askForMediaAccess('microphone'); - await require('electron').remote.systemPreferences.askForMediaAccess('camera'); + ipc.send('grantPermissions'); Ext.cq1('app-main').removeDocked(btn.up('toolbar'), true); } } diff --git a/package.json b/package.json index 848eacef..8aaf2389 100644 --- a/package.json +++ b/package.json @@ -74,11 +74,11 @@ "target": [ "default" ], - "entitlements": "entitlements.mac.plist", - "entitlementsInherit": "entitlements.mac.plist", + "entitlements": "resources/installer/entitlements.mac.plist", + "entitlementsInherit": "resources/installer/entitlements.mac.plist", "extendInfo": { - "NSMicrophoneUsageDescription": "Apps inside Rambox may need access to your microphone. Please, grant access to have a better experience.", - "NSCameraUsageDescription": "Apps inside Rambox may need access to your camera. Please, grant access to have a better experience." + "NSMicrophoneUsageDescription": "Apps inside Rambox CE may need access to your microphone. Please, grant access to have a better experience.", + "NSCameraUsageDescription": "Apps inside Rambox CE may need access to your camera. Please, grant access to have a better experience." } }, "dmg": { diff --git a/entitlements.mac.plist b/resources/installer/entitlements.mac.plist similarity index 100% rename from entitlements.mac.plist rename to resources/installer/entitlements.mac.plist