From 2a5758fbc48c654456c8f7198fa0cd82bbca671f Mon Sep 17 00:00:00 2001 From: Huang Xin Date: Sun, 5 Oct 2025 14:28:45 +0800 Subject: [PATCH] compat: disable customize root dir for macOS App Store builds (#2171) CustomizeRootDir has a blocker on macOS App Store builds due to Security Scoped Resource restrictions. See: https://github.com/tauri-apps/tauri/issues/3716 --- apps/readest-app/src/services/nativeAppService.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/readest-app/src/services/nativeAppService.ts b/apps/readest-app/src/services/nativeAppService.ts index 4c3a6615..ea3892bd 100644 --- a/apps/readest-app/src/services/nativeAppService.ts +++ b/apps/readest-app/src/services/nativeAppService.ts @@ -348,7 +348,9 @@ export class NativeAppService extends BaseAppService { // orientation lock is not supported on iPad override hasOrientationLock = (OS_TYPE === 'ios' && getOSPlatform() === 'ios') || OS_TYPE === 'android'; - override canCustomizeRootDir = OS_TYPE !== 'ios'; + // CustomizeRootDir has a blocker on macOS App Store builds due to Security Scoped Resource restrictions. + // See: https://github.com/tauri-apps/tauri/issues/3716 + override canCustomizeRootDir = process.env['NEXT_PUBLIC_DIST_CHANNEL'] !== 'appstore'; override distChannel = (process.env['NEXT_PUBLIC_DIST_CHANNEL'] || 'readest') as DistChannel; private execDir?: string = undefined;