From 924693d23dda829f81d7e4536eb9b2fca3b66215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Modro=C3=B1o=20Vara?= Date: Wed, 3 Jun 2026 13:46:37 +0200 Subject: [PATCH] Re-show What's New on every new build Key the showcase off the short version plus build number (e.g. "0.2.0 (20)") rather than the marketing version alone, so a re-cut release that keeps the same version but bumps the build still surfaces it (0.2.0 (19) -> 0.2.0 (20)). Fresh installs continue to see it. --- Sources/App/Views/ContentView.swift | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/Sources/App/Views/ContentView.swift b/Sources/App/Views/ContentView.swift index d4f09be..62a603d 100644 --- a/Sources/App/Views/ContentView.swift +++ b/Sources/App/Views/ContentView.swift @@ -21,7 +21,7 @@ struct ContentView: View { .supportPrompt() .sheet(isPresented: $showWhatsNew) { WhatsNewView(release: .current, databasePath: appState.databaseFilePath) { - lastWhatsNewVersion = WhatsNewRelease.current.version + lastWhatsNewVersion = currentBuildIdentifier showWhatsNew = false } } @@ -31,12 +31,23 @@ struct ContentView: View { } private func evaluateWhatsNew() { - // Show the showcase whenever the user hasn't seen the current release — - // fresh installs included. The sheet is only attached to the workspace, - // so onboarding is never interrupted, and `lastWhatsNewVersion` is - // stamped to the current version when the sheet is dismissed. - if lastWhatsNewVersion != WhatsNewRelease.current.version { + // Show the showcase whenever the user hasn't seen the current build — + // fresh installs included, and every new build of the same marketing + // version (e.g. 0.2.0 (19) → 0.2.0 (20)). The sheet is only attached to + // the workspace, so onboarding is never interrupted, and + // `lastWhatsNewVersion` is stamped to the current build on dismiss. + if lastWhatsNewVersion != currentBuildIdentifier { showWhatsNew = true } } + + /// Short version plus build number, e.g. "0.2.0 (20)". Keying the showcase + /// off this — rather than the marketing version alone — means each new build + /// surfaces it, which is what re-cut releases (same version, new build) need. + private var currentBuildIdentifier: String { + let info = Bundle.main.infoDictionary + let short = info?["CFBundleShortVersionString"] as? String ?? "0" + let build = info?["CFBundleVersion"] as? String ?? "0" + return "\(short) (\(build))" + } }