mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-02 00:07:56 +01:00
Improve behavior in macOS sandbox
This commit is contained in:
@@ -105,7 +105,8 @@ export function setup(
|
||||
showDebugLogWindow: () => Promise<void>,
|
||||
forceEnable = false
|
||||
): void {
|
||||
const isEnabled = !isProduction(app.getVersion()) || forceEnable;
|
||||
const isEnabled =
|
||||
(!isProduction(app.getVersion()) || forceEnable) && !process.mas;
|
||||
|
||||
if (isEnabled) {
|
||||
logger.info(`crashReporter: ${forceEnable ? 'force ' : ''}enabled`);
|
||||
|
||||
@@ -151,7 +151,7 @@ export const createTemplate = (
|
||||
},
|
||||
]
|
||||
: []),
|
||||
...(devTools && platform !== 'linux'
|
||||
...(devTools && platform !== 'linux' && !process.mas
|
||||
? [
|
||||
{
|
||||
label: i18n('icu:forceUpdate'),
|
||||
|
||||
@@ -28,6 +28,12 @@ export function updateDefaultSession(
|
||||
strictAssert(videoRequested, 'Not requesting video');
|
||||
strictAssert(!audioRequested, 'Requesting audio');
|
||||
|
||||
// desktopCapturer.getSources() will crash in the MAS sandbox.
|
||||
// This should never be reached because MAS requires
|
||||
// macOS 15+ where we use @indutny/mac-screen-share directly
|
||||
// and never call getDisplayMedia().
|
||||
strictAssert(!process.mas, 'Unexpected getDisplayMedia() in MAS build');
|
||||
|
||||
// macOS: if screen sharing is actively denied, Sonoma will crash
|
||||
// when we try to get the sources.
|
||||
if (
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.server</key>
|
||||
<true/>
|
||||
<key>com.apple.security.application-groups</key>
|
||||
<array>
|
||||
<string>U68MSDN6DR.org.whispersystems.signal-desktop</string>
|
||||
|
||||
@@ -480,8 +480,7 @@
|
||||
"extendInfo": {
|
||||
"ElectronTeamID": "U68MSDN6DR",
|
||||
"NSCameraUsageDescription": "Signal uses your camera for video calling.",
|
||||
"NSMicrophoneUsageDescription": "Signal uses your microphone for voice and video calling.",
|
||||
"ITSAppUsesNonExemptEncryption": true
|
||||
"NSMicrophoneUsageDescription": "Signal uses your microphone for voice and video calling."
|
||||
}
|
||||
},
|
||||
"win": {
|
||||
|
||||
@@ -21,7 +21,7 @@ export async function afterPack({
|
||||
packager,
|
||||
electronPlatformName,
|
||||
}: AfterPackContext): Promise<void> {
|
||||
if (electronPlatformName !== 'darwin' && electronPlatformName !== 'mas') {
|
||||
if (electronPlatformName !== 'darwin') {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -108,6 +108,15 @@ export class DesktopCapturer {
|
||||
step: Step.NativeMacOS,
|
||||
stream: this.#getNativeMacOSStream(),
|
||||
};
|
||||
} else if (process.mas) {
|
||||
// MAS without native ScreenCaptureKit support: desktopCapturer.getSources()
|
||||
// is unavailable in the App Store sandbox. Gracefully report an error.
|
||||
this.#state = { step: Step.Error };
|
||||
options.onError(
|
||||
new Error(
|
||||
'Screen sharing requires macOS 15+ on the Mac App Store version'
|
||||
)
|
||||
);
|
||||
} else {
|
||||
this.#state = { step: Step.RequestingMedia, promise: this.#getStream() };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user