diff --git a/app/crashReports.main.ts b/app/crashReports.main.ts index dbb14592da..194b086b69 100644 --- a/app/crashReports.main.ts +++ b/app/crashReports.main.ts @@ -105,7 +105,8 @@ export function setup( showDebugLogWindow: () => Promise, 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`); diff --git a/app/menu.std.ts b/app/menu.std.ts index 838b797bbc..0f47420e1d 100644 --- a/app/menu.std.ts +++ b/app/menu.std.ts @@ -151,7 +151,7 @@ export const createTemplate = ( }, ] : []), - ...(devTools && platform !== 'linux' + ...(devTools && platform !== 'linux' && !process.mas ? [ { label: i18n('icu:forceUpdate'), diff --git a/app/updateDefaultSession.main.ts b/app/updateDefaultSession.main.ts index 1a0ace16ac..c0980f6d76 100644 --- a/app/updateDefaultSession.main.ts +++ b/app/updateDefaultSession.main.ts @@ -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 ( diff --git a/build/entitlements.mas-dev.plist b/build/entitlements.mas-dev.plist index 3792692b60..eff52a1624 100644 --- a/build/entitlements.mas-dev.plist +++ b/build/entitlements.mas-dev.plist @@ -23,6 +23,8 @@ com.apple.security.network.client + com.apple.security.network.server + com.apple.security.application-groups U68MSDN6DR.org.whispersystems.signal-desktop diff --git a/package.json b/package.json index f97e383217..262c6fc19f 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/ts/scripts/prune-macos-release.node.ts b/ts/scripts/prune-macos-release.node.ts index e412f1bec6..478ceb9210 100644 --- a/ts/scripts/prune-macos-release.node.ts +++ b/ts/scripts/prune-macos-release.node.ts @@ -21,7 +21,7 @@ export async function afterPack({ packager, electronPlatformName, }: AfterPackContext): Promise { - if (electronPlatformName !== 'darwin' && electronPlatformName !== 'mas') { + if (electronPlatformName !== 'darwin') { return; } diff --git a/ts/util/desktopCapturer.preload.ts b/ts/util/desktopCapturer.preload.ts index a59e95bf44..672734d209 100644 --- a/ts/util/desktopCapturer.preload.ts +++ b/ts/util/desktopCapturer.preload.ts @@ -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() }; }