diff --git a/main.js b/main.js index 9487327..2c6dc3e 100644 --- a/main.js +++ b/main.js @@ -162,7 +162,9 @@ function createJitsiMeetWindow() { setApplicationMenu(); // Check for Updates. - autoUpdater.checkForUpdatesAndNotify(); + if (!process.mas) { + autoUpdater.checkForUpdatesAndNotify(); + } // Load the previous window state with fallback to defaults. const windowState = windowStateKeeper({ @@ -290,8 +292,9 @@ function handleProtocolCall(fullProtocolCall) { /** * Force Single Instance Application. + * Handle this on darwin via LSMultipleInstancesProhibited in Info.plist as below does not work on MAS */ -const gotInstanceLock = app.requestSingleInstanceLock(); +const gotInstanceLock = process.platform === 'darwin' ? true : app.requestSingleInstanceLock(); if (!gotInstanceLock) { app.quit(); @@ -345,10 +348,7 @@ app.on('second-instance', (event, commandLine) => { }); app.on('window-all-closed', () => { - // Don't quit the application on macOS. - if (process.platform !== 'darwin') { - app.quit(); - } + app.quit(); }); // remove so we can register each time as we run the app. diff --git a/package.json b/package.json index c56f92e..c896c82 100644 --- a/package.json +++ b/package.json @@ -39,11 +39,18 @@ "hardenedRuntime": true, "entitlements": "entitlements.mac.plist", "entitlementsInherit": "entitlements.mac.plist", + "asarUnpack": "**/*.node", "extendInfo": { "NSCameraUsageDescription": "Jitsi Meet requires access to your camera in order to make video-calls.", - "NSMicrophoneUsageDescription": "Jitsi Meet requires access to your microphone in order to make calls (audio/video)." + "NSMicrophoneUsageDescription": "Jitsi Meet requires access to your microphone in order to make calls (audio/video).", + "LSMultipleInstancesProhibited": true } }, + "mas": { + "entitlements": "resources/entitlements.mas.plist", + "entitlementsInherit": "resources/entitlements.mas.inherit.plist", + "hardenedRuntime": false + }, "linux": { "artifactName": "jitsi-meet-${arch}.${ext}", "category": "VideoConference;AudioVideo;Audio;Video;Network", diff --git a/resources/entitlements.mas.inherit.plist b/resources/entitlements.mas.inherit.plist new file mode 100644 index 0000000..656b548 --- /dev/null +++ b/resources/entitlements.mas.inherit.plist @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.inherit + + + diff --git a/resources/entitlements.mas.plist b/resources/entitlements.mas.plist new file mode 100644 index 0000000..2cb754e --- /dev/null +++ b/resources/entitlements.mas.plist @@ -0,0 +1,16 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.network.client + + com.apple.security.device.camera + + com.apple.security.device.audio-input + + com.apple.security.device.microphone + + +