Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

Fix frontend download links pointing to split Mac binaries (#6325)

James Brunton270af912d44b
diff --git a/frontend/src/core/components/onboarding/useOnboardingDownload.ts b/frontend/src/core/components/onboarding/useOnboardingDownload.ts
index 82abc29b82..5e23d9a0ad 100644
--- a/frontend/src/core/components/onboarding/useOnboardingDownload.ts
+++ b/frontend/src/core/components/onboarding/useOnboardingDownload.ts
@@ -35,13 +35,8 @@ export function useOnboardingDownload(): UseOnboardingDownloadResult {
switch (osType) {
case "windows":
return { label: "Windows", url: DOWNLOAD_URLS.WINDOWS };
- case "mac-apple":
- return {
- label: "Mac (Apple Silicon)",
- url: DOWNLOAD_URLS.MAC_APPLE_SILICON,
- };
- case "mac-intel":
- return { label: "Mac (Intel)", url: DOWNLOAD_URLS.MAC_INTEL };
+ case "mac":
+ return { label: "Mac", url: DOWNLOAD_URLS.MAC };
case "linux-x64":
case "linux-arm64":
return { label: "Linux", url: DOWNLOAD_URLS.LINUX_DOCS };
@@ -54,16 +49,7 @@ export function useOnboardingDownload(): UseOnboardingDownloadResult {
() =>
[
{ label: "Windows", url: DOWNLOAD_URLS.WINDOWS, value: "windows" },
- {
- label: "Mac (Apple Silicon)",
- url: DOWNLOAD_URLS.MAC_APPLE_SILICON,
- value: "mac-apple",
- },
- {
- label: "Mac (Intel)",
- url: DOWNLOAD_URLS.MAC_INTEL,
- value: "mac-intel",
- },
+ { label: "Mac", url: DOWNLOAD_URLS.MAC, value: "mac" },
{ label: "Linux", url: DOWNLOAD_URLS.LINUX_DOCS, value: "linux" },
].filter((opt) => opt.url),
[],
diff --git a/frontend/src/core/constants/downloads.ts b/frontend/src/core/constants/downloads.ts
index e67f8f7daf..cb5d2f21ba 100644
--- a/frontend/src/core/constants/downloads.ts
+++ b/frontend/src/core/constants/downloads.ts
@@ -1,8 +1,7 @@
// Centralized download URLs for Stirling PDF desktop installers
export const DOWNLOAD_URLS = {
WINDOWS: "https://files.stirlingpdf.com/win-installer.exe",
- MAC_APPLE_SILICON: "https://files.stirlingpdf.com/mac-installer.dmg",
- MAC_INTEL: "https://files.stirlingpdf.com/mac-x86_64-installer.dmg",
+ MAC: "https://files.stirlingpdf.com/mac-installer.dmg",
LINUX_DOCS: "https://docs.stirlingpdf.com/Installation/Unix%20Installation/",
} as const;
diff --git a/frontend/src/core/hooks/useOs.ts b/frontend/src/core/hooks/useOs.ts
index e4b37ad3fe..bb24c049f7 100644
--- a/frontend/src/core/hooks/useOs.ts
+++ b/frontend/src/core/hooks/useOs.ts
@@ -2,8 +2,7 @@ import { useEffect, useState } from "react";
export type OS =
| "windows"
- | "mac-intel"
- | "mac-apple"
+ | "mac"
| "linux-x64"
| "linux-arm64"
| "ios"
@@ -23,15 +22,7 @@ function parseUA(ua: string): OS {
if (/android/.test(uaLower)) return "android";
if (/windows nt/.test(uaLower)) return "windows";
- if (/mac os x/.test(uaLower)) {
- // Default to Intel; refine via hints below
- let detected: OS = "mac-intel";
- // Safari on Apple Silicon sometimes exposes both tokens
- if (ua.includes("Apple") && ua.includes("ARM")) {
- detected = "mac-apple";
- }
- return detected; // will be further refined via Client Hints if available
- }
+ if (/mac os x/.test(uaLower)) return "mac";
if (/linux|x11/.test(uaLower)) return "linux-x64";
return "unknown";
@@ -64,10 +55,7 @@ export function useOs(): OS {
else if (plat.includes("ios")) detected = "ios";
else if (plat.includes("android")) detected = "android";
else if (plat.includes("mac")) {
- // CH “architecture” is often "arm" on Apple Silicon
- detected = architecture?.toLowerCase().includes("arm")
- ? "mac-apple"
- : "mac-intel";
+ detected = "mac";
} else if (plat.includes("linux") || plat.includes("chrome os")) {
const archLower = (architecture || "").toLowerCase();
const isArm =
@@ -78,9 +66,6 @@ export function useOs(): OS {
} catch {
// ignore
}
- } else {
- // Heuristic Apple Silicon from UA when no Client Hints (Safari): uncertain, prefer not to guess
- // Keep detected as-is (often 'mac-intel').
}
if (!cancelled) setOs(detected);
diff --git a/frontend/src/saas/components/onboarding/useSaasOnboardingState.ts b/frontend/src/saas/components/onboarding/useSaasOnboardingState.ts
index ecba61bf2f..e0728556f6 100644
--- a/frontend/src/saas/components/onboarding/useSaasOnboardingState.ts
+++ b/frontend/src/saas/components/onboarding/useSaasOnboardingState.ts
@@ -46,13 +46,8 @@ export function useSaasOnboardingState({
switch (osType) {
case "windows":
return { label: "Windows", url: DOWNLOAD_URLS.WINDOWS };
- case "mac-apple":
- return {
- label: "Mac (Apple Silicon)",
- url: DOWNLOAD_URLS.MAC_APPLE_SILICON,
- };
- case "mac-intel":
- return { label: "Mac (Intel)", url: DOWNLOAD_URLS.MAC_INTEL };
+ case "mac":
+ return { label: "Mac", url: DOWNLOAD_URLS.MAC };
case "linux-x64":
case "linux-arm64":
return { label: "Linux", url: DOWNLOAD_URLS.LINUX_DOCS };
@@ -64,16 +59,7 @@ export function useSaasOnboardingState({
const osOptions = useMemo(() => {
const options = [
{ label: "Windows", url: DOWNLOAD_URLS.WINDOWS, value: "windows" },
- {
- label: "Mac (Apple Silicon)",
- url: DOWNLOAD_URLS.MAC_APPLE_SILICON,
- value: "mac-apple",
- },
- {
- label: "Mac (Intel)",
- url: DOWNLOAD_URLS.MAC_INTEL,
- value: "mac-intel",
- },
+ { label: "Mac", url: DOWNLOAD_URLS.MAC, value: "mac" },
{ label: "Linux", url: DOWNLOAD_URLS.LINUX_DOCS, value: "linux" },
];
return options.filter((opt) => opt.url);