diff --git a/Baccarat/Views/SettingsView.swift b/Baccarat/Views/SettingsView.swift index c3328ba..62a97ca 100644 --- a/Baccarat/Views/SettingsView.swift +++ b/Baccarat/Views/SettingsView.swift @@ -18,6 +18,13 @@ struct SettingsView: View { @State private var hasChanges = false @State private var showClearDataAlert = false + /// App version string from bundle info + private var appVersionString: String { + let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "1.0" + let build = Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? "1" + return "Baccarat v\(version) (\(build))" + } + var body: some View { SheetContainerView( title: String(localized: "Settings"), @@ -253,6 +260,14 @@ struct SettingsView: View { } .padding(.horizontal) .padding(.top, Design.Spacing.small) + + // App Version + Text(appVersionString) + .font(.system(size: Design.BaseFontSize.callout)) + .foregroundStyle(.white.opacity(Design.Opacity.light)) + .frame(maxWidth: .infinity) + .padding(.top, Design.Spacing.large) + .padding(.bottom, Design.Spacing.medium) }, onCancel: { settings.load() // Revert changes