Skip to content

Free, open-source macOS cleaner. CleanMyMac alternative with zero telemetry. Native SwiftUI, scheduled auto-cleaning, Xcode/Homebrew/system cache cleanup. MIT licensed.

fix: fix app version + setting button

Theo Sementa7ca3fef7e243
diff --git a/PureMac.xcodeproj/project.pbxproj b/PureMac.xcodeproj/project.pbxproj
index a32874a..c9d2982 100644
--- a/PureMac.xcodeproj/project.pbxproj
+++ b/PureMac.xcodeproj/project.pbxproj
@@ -15,13 +15,14 @@
826A750D2D7EC14C2AE306A3 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3667D46D8E2004EB4D73835A /* Models.swift */; };
A221744A723582A6D075A7A0 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86105573F4051764E9E46626 /* ContentView.swift */; };
A89DF967EC9E5E8123B2925A /* SmartScanView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11BA091943263913276F3CCF /* SmartScanView.swift */; };
+ AA0000000000000000000004 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = AA0000000000000000000003 /* Localizable.strings */; };
B52938BBD11842631314543D /* CategoryDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10B0AF194677EAC1D5568785 /* CategoryDetailView.swift */; };
B8A524AF7F7DCDFCFCA9EDF6 /* AppViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD7FDA1B749FFA61DFB52AB5 /* AppViewModel.swift */; };
D9445C2641A8637B65DA5ACE /* ScanEngine.swift in Sources */ = {isa = PBXBuildFile; fileRef = A711CDF5285F68775D9B5513 /* ScanEngine.swift */; };
+ D9D4E0FA2F8C135400ABB13C /* AppConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9D4E0F92F8C135400ABB13C /* AppConstants.swift */; };
DDD6BA35DBF32E7A6B5F6F8B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B2EA41E1096FA8E3B916AD13 /* Assets.xcassets */; };
EDEF28CAD23E936FBED1783B /* PureMacApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63581B70F9B10231964E3602 /* PureMacApp.swift */; };
F1A2B3C4D5E6F70819203142 /* FullDiskAccessManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1B2C3D4E5F607182930A1B2 /* FullDiskAccessManager.swift */; };
- AA0000000000000000000004 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = AA0000000000000000000003 /* Localizable.strings */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -33,17 +34,18 @@
311078221878708524283765 /* PureMac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PureMac.app; sourceTree = BUILT_PRODUCTS_DIR; };
3667D46D8E2004EB4D73835A /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = "<group>"; };
46660271CFF167AB0FE7371D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
- A1B2C3D4E5F607182930A1B2 /* FullDiskAccessManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FullDiskAccessManager.swift; sourceTree = "<group>"; };
5402892366B3F00417FD05F9 /* SidebarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SidebarView.swift; sourceTree = "<group>"; };
5664D2BDAEAA9AE3A53DB364 /* PureMac.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = PureMac.entitlements; sourceTree = "<group>"; };
63581B70F9B10231964E3602 /* PureMacApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PureMacApp.swift; sourceTree = "<group>"; };
86105573F4051764E9E46626 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
+ A1B2C3D4E5F607182930A1B2 /* FullDiskAccessManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FullDiskAccessManager.swift; sourceTree = "<group>"; };
A711CDF5285F68775D9B5513 /* ScanEngine.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScanEngine.swift; sourceTree = "<group>"; };
+ AA0000000000000000000001 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
+ AA0000000000000000000002 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = "<group>"; };
B2EA41E1096FA8E3B916AD13 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
C5ADDC35F31E40780FB5D017 /* Theme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Theme.swift; sourceTree = "<group>"; };
+ D9D4E0F92F8C135400ABB13C /* AppConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppConstants.swift; sourceTree = "<group>"; };
DD7FDA1B749FFA61DFB52AB5 /* AppViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppViewModel.swift; sourceTree = "<group>"; };
- AA0000000000000000000001 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
- AA0000000000000000000002 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXGroup section */
@@ -110,9 +112,18 @@
path = ViewModels;
sourceTree = "<group>";
};
+ D9D4E0F82F8C135000ABB13C /* Core */ = {
+ isa = PBXGroup;
+ children = (
+ D9D4E0F92F8C135400ABB13C /* AppConstants.swift */,
+ );
+ path = Core;
+ sourceTree = "<group>";
+ };
E383F69184F4552E5A41D010 /* PureMac */ = {
isa = PBXGroup;
children = (
+ D9D4E0F82F8C135000ABB13C /* Core */,
B2EA41E1096FA8E3B916AD13 /* Assets.xcassets */,
AA0000000000000000000003 /* Localizable.strings */,
46660271CFF167AB0FE7371D /* Info.plist */,
@@ -129,18 +140,6 @@
};
/* End PBXGroup section */
-/* Begin PBXVariantGroup section */
- AA0000000000000000000003 /* Localizable.strings */ = {
- isa = PBXVariantGroup;
- children = (
- AA0000000000000000000001 /* en */,
- AA0000000000000000000002 /* zh-Hans */,
- );
- name = Localizable.strings;
- sourceTree = "<group>";
- };
-/* End PBXVariantGroup section */
-
/* Begin PBXNativeTarget section */
B19E38DEAA0144A77120F39C /* PureMac */ = {
isa = PBXNativeTarget;
@@ -223,6 +222,7 @@
27F449EDD1B082FE11FEC9DF /* SchedulerService.swift in Sources */,
015C7A8CE16D49F2C445C02A /* SettingsView.swift in Sources */,
0A7B70CBA747ED9FEE20C51A /* SidebarView.swift in Sources */,
+ D9D4E0FA2F8C135400ABB13C /* AppConstants.swift in Sources */,
A89DF967EC9E5E8123B2925A /* SmartScanView.swift in Sources */,
340E424F759ACCDE7372F99F /* Theme.swift in Sources */,
);
@@ -230,6 +230,18 @@
};
/* End PBXSourcesBuildPhase section */
+/* Begin PBXVariantGroup section */
+ AA0000000000000000000003 /* Localizable.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ AA0000000000000000000001 /* en */,
+ AA0000000000000000000002 /* zh-Hans */,
+ );
+ name = Localizable.strings;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
/* Begin XCBuildConfiguration section */
0794DC5454CB748EC1374422 /* Debug */ = {
isa = XCBuildConfiguration;
@@ -311,7 +323,10 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = PureMac/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/../Frameworks",
+ );
PRODUCT_NAME = PureMac;
SDKROOT = macosx;
SWIFT_EMIT_LOC_STRINGS = YES;
@@ -391,7 +406,10 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = PureMac/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/../Frameworks",
+ );
PRODUCT_NAME = PureMac;
SDKROOT = macosx;
SWIFT_EMIT_LOC_STRINGS = YES;
diff --git a/PureMac/Core/AppConstants.swift b/PureMac/Core/AppConstants.swift
new file mode 100644
index 0000000..85c26cb
--- /dev/null
+++ b/PureMac/Core/AppConstants.swift
@@ -0,0 +1,14 @@
+//
+// AppConstants.swift
+// PureMac
+//
+// Created by Theo Sementa on 12/04/2026.
+//
+
+import Foundation
+
+struct AppConstants {
+
+ static let appVersion: String = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "0"
+
+}
diff --git a/PureMac/Views/ContentView.swift b/PureMac/Views/ContentView.swift
index 5291a3c..e99f78f 100644
--- a/PureMac/Views/ContentView.swift
+++ b/PureMac/Views/ContentView.swift
@@ -179,21 +179,28 @@ struct TopBarView: View {
}
// Settings button
- Button(action: {
- if #available(macOS 14.0, *) {
- NSApp.sendAction(Selector(("showSettingsWindow:")), to: nil, from: nil)
- } else {
+ if #available(macOS 14.0, *) {
+ SettingsLink {
+ iconGearView
+ }
+ .buttonStyle(.plain)
+ } else {
+ Button(action: {
NSApp.sendAction(Selector(("showPreferencesWindow:")), to: nil, from: nil)
+ }) {
+ iconGearView
}
- }) {
- Image(systemName: "gearshape.fill")
- .font(.system(size: 14))
- .foregroundColor(.pmTextSecondary)
- .frame(width: 32, height: 32)
- .background(Color.pmCard.opacity(0.6))
- .cornerRadius(8)
+ .buttonStyle(.plain)
}
- .buttonStyle(.plain)
}
}
+
+ var iconGearView: some View {
+ Image(systemName: "gearshape.fill")
+ .font(.system(size: 14))
+ .foregroundColor(.pmTextSecondary)
+ .frame(width: 32, height: 32)
+ .background(Color.pmCard.opacity(0.6))
+ .cornerRadius(8)
+ }
}
diff --git a/PureMac/Views/SettingsView.swift b/PureMac/Views/SettingsView.swift
index 47b7162..0c18bd7 100644
--- a/PureMac/Views/SettingsView.swift
+++ b/PureMac/Views/SettingsView.swift
@@ -210,7 +210,7 @@ struct AboutTab: View {
Text("PureMac")
.font(.system(size: 24, weight: .bold, design: .rounded))
- Text("Version 1.0.0")
+ Text("Version \(AppConstants.appVersion)")
.font(.system(size: 13))
.foregroundColor(.secondary)
diff --git a/PureMac/Views/SidebarView.swift b/PureMac/Views/SidebarView.swift
index 4001d70..3e79910 100644
--- a/PureMac/Views/SidebarView.swift
+++ b/PureMac/Views/SidebarView.swift
@@ -86,7 +86,7 @@ struct SidebarView: View {
.padding(.horizontal, 16)
}
- Text("v1.0.0")
+ Text("v\(AppConstants.appVersion)")
.font(.system(size: 10))
.foregroundColor(.pmTextMuted)
.padding(.bottom, 12)