Free, open-source macOS cleaner. CleanMyMac alternative with zero telemetry. Native SwiftUI, scheduled auto-cleaning, Xcode/Homebrew/system cache cleanup. MIT licensed.
Swift cache-cleanercleanmymaccleanupdisk-cleanerdisk-spacehomebrewmac-utilitymacosmacos-appmacos-cleanermacosxnativeossosxprivacyswiftswiftuisystem-cleanerxcode-cleaner
feat: Arc-style onboarding with live FDA demo + restraint pass + bump to 2.5.0 (build 9)
moamen30280c93bfc3
diff --git a/PureMac.xcodeproj/project.pbxproj b/PureMac.xcodeproj/project.pbxprojindex e2ac18b..69cc18c 100644--- a/PureMac.xcodeproj/project.pbxproj+++ b/PureMac.xcodeproj/project.pbxproj@@ -17,6 +17,7 @@48D1431A7C99C19EEBDB056B /* CleaningEngine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A8DE5D45BA19E2670B57DC5 /* CleaningEngine.swift */; };4F754D89F4CE5142BE384062 /* AppConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = F31F91226CDCFBB8E303B7DA /* AppConstants.swift */; };50304378D99F2E9E48B642AF /* Sparkle in Frameworks */ = {isa = PBXBuildFile; productRef = 9CC8F66E27BE52A6639E904B /* Sparkle */; };+ 52F11962555C639F0EECADD6 /* FDADemoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231FF7CBB5F621B66F2AB8A5 /* FDADemoView.swift */; };535B23C0108C06475215B8E8 /* AppTheme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AB003A7751F05727DBFD1A5 /* AppTheme.swift */; };59B3096E2AE8ED0397B16798 /* AppLanguagePreferencesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 491771F923C93FD61A263893 /* AppLanguagePreferencesTests.swift */; };61D285E96DED76FDCD54570F /* PermissionSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 069AAE87E3F9EDE5593AD8B3 /* PermissionSheet.swift */; };@@ -67,6 +68,7 @@155CE1B8CDCCCA6F9FD028C1 /* LocalizationFilesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalizationFilesTests.swift; sourceTree = "<group>"; };1AB003A7751F05727DBFD1A5 /* AppTheme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppTheme.swift; sourceTree = "<group>"; };1D3AC5F17D7CA94FAB1E8D7A /* StringNormalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringNormalization.swift; sourceTree = "<group>"; };+ 231FF7CBB5F621B66F2AB8A5 /* FDADemoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FDADemoView.swift; sourceTree = "<group>"; };23486A54A82EE3865B784D1C /* AppInfoFetcher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppInfoFetcher.swift; sourceTree = "<group>"; };2641C6376DD6F5889F35510E /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = "<group>"; };28181F034530331A550C6A3D /* SchedulerService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SchedulerService.swift; sourceTree = "<group>"; };@@ -209,6 +211,7 @@92259B3E9F4468865F15DEEC /* AppearancePill.swift */,1AB003A7751F05727DBFD1A5 /* AppTheme.swift */,424F7B28624C271620E13BBC /* EmptyStateView.swift */,+ 231FF7CBB5F621B66F2AB8A5 /* FDADemoView.swift */,069AAE87E3F9EDE5593AD8B3 /* PermissionSheet.swift */,);path = Components;@@ -418,6 +421,7 @@8947F0CE448791BD50EECF46 /* Conditions.swift in Sources */,A2AE68CC75CB72D6B10CBDF5 /* DashboardView.swift in Sources */,76B132F9C499225D33E0D075 /* EmptyStateView.swift in Sources */,+ 52F11962555C639F0EECADD6 /* FDADemoView.swift in Sources */,2253F11BDF561B617439C96B /* FullDiskAccessManager.swift in Sources */,E60B0A2C5D0A6CAE35BF4DFB /* Locations.swift in Sources */,DDDA5879006CB97D5D7BDD87 /* Logger.swift in Sources */,@@ -517,7 +521,7 @@CODE_SIGN_STYLE = Automatic;COMBINE_HIDPI_IMAGES = YES;COPY_PHASE_STRIP = NO;- CURRENT_PROJECT_VERSION = 8;+ CURRENT_PROJECT_VERSION = 9;DEBUG_INFORMATION_FORMAT = dwarf;DEVELOPMENT_TEAM = H3WXHVTP97;ENABLE_STRICT_OBJC_MSGSEND = YES;@@ -539,7 +543,7 @@GENERATE_INFOPLIST_FILE = NO;INFOPLIST_FILE = PureMac/Info.plist;MACOSX_DEPLOYMENT_TARGET = 13.0;- MARKETING_VERSION = 2.4.0;+ MARKETING_VERSION = 2.5.0;MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;MTL_FAST_MATH = YES;ONLY_ACTIVE_ARCH = NO;@@ -641,7 +645,7 @@CODE_SIGN_STYLE = Automatic;COMBINE_HIDPI_IMAGES = YES;COPY_PHASE_STRIP = NO;- CURRENT_PROJECT_VERSION = 8;+ CURRENT_PROJECT_VERSION = 9;DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";DEVELOPMENT_TEAM = H3WXHVTP97;ENABLE_NS_ASSERTIONS = NO;@@ -657,7 +661,7 @@GENERATE_INFOPLIST_FILE = NO;INFOPLIST_FILE = PureMac/Info.plist;MACOSX_DEPLOYMENT_TARGET = 13.0;- MARKETING_VERSION = 2.4.0;+ MARKETING_VERSION = 2.5.0;MTL_ENABLE_DEBUG_INFO = NO;MTL_FAST_MATH = YES;ONLY_ACTIVE_ARCH = NO;diff --git a/PureMac/Views/CategoryDetailView.swift b/PureMac/Views/CategoryDetailView.swiftindex 8ffc433..9ada946 100644--- a/PureMac/Views/CategoryDetailView.swift+++ b/PureMac/Views/CategoryDetailView.swift@@ -114,7 +114,7 @@ struct CategoryDetailView: View {VStack(alignment: .leading, spacing: 4) {Text(LocalizedStringKey(category.rawValue))- .font(.system(size: 22, weight: .bold))+ .font(.system(size: 22, weight: .semibold))Text(LocalizedStringKey(category.description)).font(.system(size: 12)).foregroundStyle(.secondary)diff --git a/PureMac/Views/Components/AppTheme.swift b/PureMac/Views/Components/AppTheme.swiftindex eb0b671..b45b4e6 100644--- a/PureMac/Views/Components/AppTheme.swift+++ b/PureMac/Views/Components/AppTheme.swift@@ -43,57 +43,50 @@ final class ThemeManager: ObservableObject {}}-/// Centralized accent palette. Keeping these in one place lets the dashboard-/// and sidebar share semantic tints (cleanup orange, performance green, etc.)-/// instead of scattered Color literals.+/// Centralized accent palette. One blue, one green for success, one orange+/// for warning, one red for destructive. Other tints exist for categorical+/// differentiation but the surface chrome only uses these four.enum Tint {static let blue = Color(red: 0.04, green: 0.52, blue: 1.00)static let green = Color(red: 0.18, green: 0.78, blue: 0.47)- static let orange = Color(red: 1.00, green: 0.62, blue: 0.04)- static let purple = Color(red: 0.69, green: 0.32, blue: 0.87)+ static let orange = Color(red: 1.00, green: 0.58, blue: 0.04)+ static let purple = Color(red: 0.55, green: 0.32, blue: 0.87)static let pink = Color(red: 1.00, green: 0.30, blue: 0.50)- static let cyan = Color(red: 0.30, green: 0.80, blue: 0.95)+ static let cyan = Color(red: 0.30, green: 0.78, blue: 0.95)static let red = Color(red: 1.00, green: 0.27, blue: 0.23)static let yellow = Color(red: 1.00, green: 0.78, blue: 0.04)}/// Tinted square icon container used in the sidebar and on dashboard cards.-/// The optional inner gradient + soft shadow give the tile depth rather than-/// the previous flat color swatch.+/// Single muted fill, thin border. The tint identifies the category - it+/// doesn't need to glow.struct IconTile: View {let systemName: Stringvar tint: Color = Tint.bluevar size: CGFloat = 26var corner: CGFloat = 7+ /// Retained for callsite compatibility; intentionally a no-op in the+ /// restrained design so call sites don't have to change.var glow: Bool = falsevar body: some View {ZStack {RoundedRectangle(cornerRadius: corner, style: .continuous)- .fill(- LinearGradient(- colors: [tint.opacity(0.22), tint.opacity(0.10)],- startPoint: .topLeading, endPoint: .bottomTrailing- )- )- RoundedRectangle(cornerRadius: corner, style: .continuous)- .strokeBorder(tint.opacity(0.18), lineWidth: 0.5)+ .fill(tint.opacity(0.14))Image(systemName: systemName).font(.system(size: size * 0.52, weight: .semibold)).foregroundStyle(tint)}.frame(width: size, height: size)- .shadow(color: glow ? tint.opacity(0.35) : .clear, radius: glow ? 6 : 0, y: 1)}}-/// Premium card surface used on the dashboard, suggestion list, and detail-/// pages. Inner gradient fill + dual-layer shadow (ambient + contact) gives-/// the cards depth without dropping into heavy material that fights the-/// system look. Optional accent stripe lights up the leading edge so cards-/// can carry semantic colour without painting the whole surface.+/// Card surface. Flat fill, hairline border, single soft shadow. No accent+/// stripe by default — content hierarchy carries the meaning, not chrome.struct CardSurface<Content: View>: View {var padding: CGFloat = 16+ /// Retained for callsite compatibility; the accent line is intentionally+ /// not rendered in the restrained design.var accent: Color? = nilvar elevation: CardElevation = .standard@ViewBuilder var content: Content@@ -102,41 +95,14 @@ struct CardSurface<Content: View>: View {content.padding(padding).background(- ZStack {- RoundedRectangle(cornerRadius: 14, style: .continuous)- .fill(Color(nsColor: .controlBackgroundColor))- RoundedRectangle(cornerRadius: 14, style: .continuous)- .fill(- LinearGradient(- colors: [- Color.white.opacity(0.04),- Color.clear,- ],- startPoint: .top, endPoint: .bottom- )- )- if let accent {- HStack(spacing: 0) {- Rectangle()- .fill(- LinearGradient(- colors: [accent.opacity(0.85), accent.opacity(0.35)],- startPoint: .top, endPoint: .bottom- )- )- .frame(width: 3)- Spacer(minLength: 0)- }- .clipShape(RoundedRectangle(cornerRadius: 14, style: .continuous))- }- }+ RoundedRectangle(cornerRadius: 12, style: .continuous)+ .fill(Color(nsColor: .controlBackgroundColor))).overlay(- RoundedRectangle(cornerRadius: 14, style: .continuous)+ RoundedRectangle(cornerRadius: 12, style: .continuous).strokeBorder(Color.primary.opacity(0.07), lineWidth: 0.5)).shadow(color: .black.opacity(elevation.ambient), radius: elevation.ambientRadius, y: elevation.ambientY)- .shadow(color: .black.opacity(elevation.contact), radius: 1, y: 0.5)}}@@ -145,32 +111,30 @@ enum CardElevation {var ambient: Double {switch self {- case .flat: return 0.02- case .standard: return 0.06- case .raised: return 0.10+ case .flat: return 0.0+ case .standard: return 0.04+ case .raised: return 0.07}}var ambientRadius: CGFloat {switch self {- case .flat: return 2- case .standard: return 6- case .raised: return 14+ case .flat: return 0+ case .standard: return 4+ case .raised: return 10}}var ambientY: CGFloat {switch self {- case .flat: return 1- case .standard: return 2- case .raised: return 6+ case .flat: return 0+ case .standard: return 1+ case .raised: return 3}}-- var contact: Double { 0.05 }}-/// Pill-shaped chip used for inline status pills (severity, counts, etc.).+/// Small status pill. Solid tint background at low opacity, no gradient.struct StatusChip: View {let label: Stringvar systemImage: String? = nil@@ -188,33 +152,21 @@ struct StatusChip: View {}.padding(.horizontal, 8).padding(.vertical, 3)- .background(- Capsule()- .fill(- LinearGradient(- colors: [tint.opacity(0.22), tint.opacity(0.12)],- startPoint: .topLeading, endPoint: .bottomTrailing- )- )- )- .overlay(- Capsule().strokeBorder(tint.opacity(0.25), lineWidth: 0.5)- )+ .background(Capsule().fill(tint.opacity(0.14))).foregroundStyle(tint)}}-/// Modifier that bumps an element on hover and shrinks it on press. Cheap way-/// to give cards and rows a tactile feel without writing per-call animations.+/// Subtle hover/press feedback for tappable cards. Scale only — no glow.struct PressableScale: ViewModifier {@State private var hovering = false@State private var pressing = false- var hoverScale: CGFloat = 1.012+ var hoverScale: CGFloat = 1.006func body(content: Content) -> some View {content- .scaleEffect(pressing ? 0.985 : (hovering ? hoverScale : 1.0))- .animation(.spring(response: 0.22, dampingFraction: 0.75), value: hovering)+ .scaleEffect(pressing ? 0.99 : (hovering ? hoverScale : 1.0))+ .animation(.easeOut(duration: 0.18), value: hovering).animation(.easeOut(duration: 0.08), value: pressing).onHover { hovering = $0 }.simultaneousGesture(@@ -226,7 +178,7 @@ struct PressableScale: ViewModifier {}extension View {- func pressable(hoverScale: CGFloat = 1.012) -> some View {+ func pressable(hoverScale: CGFloat = 1.006) -> some View {modifier(PressableScale(hoverScale: hoverScale))}}diff --git a/PureMac/Views/Components/FDADemoView.swift b/PureMac/Views/Components/FDADemoView.swiftnew file mode 100644index 0000000..1f46db0--- /dev/null+++ b/PureMac/Views/Components/FDADemoView.swift@@ -0,0 +1,189 @@+import SwiftUI++/// A short looping illustration of what the user is about to do in the real+/// System Settings pane. Built entirely in SwiftUI — no GIFs, no video, no+/// external assets. The point is to make the FDA step feel concrete so the+/// user knows exactly which toggle to flip before they even open Settings.+///+/// Frames cycle every ~5 seconds: idle → row highlights → toggle flips →+/// green check appears → hold → reset.+struct FDADemoView: View {+ enum Frame: Int, CaseIterable {+ case idle+ case highlight+ case toggleOn+ case granted+ case hold+ }++ @State private var frame: Frame = .idle+ @State private var isActive = true++ private var rows: [DemoRow] {+ [+ DemoRow(name: "Finder", systemImage: "macwindow", granted: true),+ DemoRow(name: "PureMac", systemImage: "sparkles",+ granted: frame == .toggleOn || frame == .granted || frame == .hold,+ isPureMac: true),+ DemoRow(name: "Terminal", systemImage: "terminal", granted: true),+ ]+ }++ var body: some View {+ VStack(spacing: 14) {+ settingsCard++ HStack(spacing: 6) {+ Image(systemName: "lock.shield")+ .font(.system(size: 11, weight: .semibold))+ Text("Privacy & Security → Full Disk Access")+ .font(.system(size: 11.5, weight: .medium))+ }+ .foregroundStyle(.secondary)+ }+ .onAppear {+ isActive = true+ cycle()+ }+ .onDisappear { isActive = false }+ }++ // MARK: - Settings card++ private var settingsCard: some View {+ VStack(spacing: 0) {+ // Faux titlebar+ HStack(spacing: 6) {+ Circle().fill(Color(red: 1.0, green: 0.36, blue: 0.34)).frame(width: 9, height: 9)+ Circle().fill(Color(red: 1.0, green: 0.78, blue: 0.27)).frame(width: 9, height: 9)+ Circle().fill(Color(red: 0.31, green: 0.78, blue: 0.36)).frame(width: 9, height: 9)+ Spacer()+ Text("Full Disk Access")+ .font(.system(size: 11, weight: .semibold))+ .foregroundStyle(.secondary)+ Spacer()+ }+ .padding(.horizontal, 12)+ .padding(.vertical, 8)+ .background(Color.primary.opacity(0.04))++ Divider()++ VStack(spacing: 0) {+ ForEach(Array(rows.enumerated()), id: \.offset) { idx, row in+ rowView(row)+ if idx != rows.count - 1 {+ Divider().padding(.leading, 46)+ }+ }+ }+ }+ .background(Color(nsColor: .controlBackgroundColor))+ .clipShape(RoundedRectangle(cornerRadius: 10, style: .continuous))+ .overlay(+ RoundedRectangle(cornerRadius: 10, style: .continuous)+ .strokeBorder(Color.primary.opacity(0.10), lineWidth: 0.5)+ )+ .shadow(color: .black.opacity(0.08), radius: 12, y: 4)+ }++ private func rowView(_ row: DemoRow) -> some View {+ let highlight = row.isPureMac && (frame == .highlight)+ let succeeded = row.isPureMac && (frame == .granted || frame == .hold)++ return HStack(spacing: 12) {+ ZStack {+ RoundedRectangle(cornerRadius: 6, style: .continuous)+ .fill(row.isPureMac ? Tint.blue.opacity(0.16) : Color.primary.opacity(0.08))+ Image(systemName: row.systemImage)+ .font(.system(size: 13, weight: .semibold))+ .foregroundStyle(row.isPureMac ? Tint.blue : .secondary)+ }+ .frame(width: 26, height: 26)++ Text(row.name)+ .font(.system(size: 13, weight: row.isPureMac ? .semibold : .regular))++ Spacer()++ if succeeded {+ Image(systemName: "checkmark.circle.fill")+ .font(.system(size: 14))+ .foregroundStyle(Tint.green)+ .transition(.scale.combined(with: .opacity))+ }++ ToggleSwitch(isOn: row.granted)+ }+ .padding(.horizontal, 14)+ .padding(.vertical, 10)+ .background(+ RoundedRectangle(cornerRadius: 6, style: .continuous)+ .fill(highlight ? Tint.blue.opacity(0.10) : .clear)+ .padding(.horizontal, 6)+ .padding(.vertical, 2)+ )+ .animation(.easeInOut(duration: 0.35), value: highlight)+ .animation(.easeInOut(duration: 0.35), value: succeeded)+ }++ // MARK: - Cycle++ private func cycle() {+ guard isActive else { return }++ let schedule: [(Frame, Double)] = [+ (.idle, 0.6),+ (.highlight, 0.9),+ (.toggleOn, 0.8),+ (.granted, 0.4),+ (.hold, 1.6),+ ]++ var accumulated: Double = 0+ for (target, hold) in schedule {+ DispatchQueue.main.asyncAfter(deadline: .now() + accumulated) {+ guard isActive else { return }+ withAnimation(.easeInOut(duration: 0.4)) {+ frame = target+ }+ }+ accumulated += hold+ }+ // Re-arm. The isActive guard at the top of cycle() is what stops the+ // chain when the view disappears.+ DispatchQueue.main.asyncAfter(deadline: .now() + accumulated + 0.4) {+ guard isActive else { return }+ withAnimation(.easeInOut(duration: 0.3)) {+ frame = .idle+ }+ cycle()+ }+ }++ private struct DemoRow {+ let name: String+ let systemImage: String+ let granted: Bool+ var isPureMac: Bool = false+ }+}++/// Tiny stand-in for an OS-style toggle. NSSwitch via SwiftUI would also work+/// but rendering one ourselves gives us full control over the animation.+private struct ToggleSwitch: View {+ let isOn: Bool++ var body: some View {+ ZStack(alignment: isOn ? .trailing : .leading) {+ Capsule()+ .fill(isOn ? Tint.green : Color.secondary.opacity(0.30))+ Circle()+ .fill(Color.white)+ .shadow(color: .black.opacity(0.15), radius: 1.5, y: 0.5)+ .padding(2)+ }+ .frame(width: 32, height: 19)+ .animation(.spring(response: 0.35, dampingFraction: 0.78), value: isOn)+ }+}diff --git a/PureMac/Views/Components/PermissionSheet.swift b/PureMac/Views/Components/PermissionSheet.swiftindex 2885342..aa9e3ef 100644--- a/PureMac/Views/Components/PermissionSheet.swift+++ b/PureMac/Views/Components/PermissionSheet.swift@@ -17,19 +17,11 @@ struct PermissionSheet: View {Divider().opacity(0.4)footer}- .frame(width: 560)- .background(- ZStack {- Color(nsColor: .windowBackgroundColor)- LinearGradient(- colors: [Tint.blue.opacity(0.06), Tint.purple.opacity(0.04), .clear],- startPoint: .topLeading, endPoint: .bottomTrailing- )- }- )+ .frame(width: 540)+ .background(Color(nsColor: .windowBackgroundColor)).onAppear {- withAnimation(.easeOut(duration: 0.5)) { appeared = true }- withAnimation(.easeInOut(duration: 1.2).repeatForever(autoreverses: true)) {+ withAnimation(.easeOut(duration: 0.4)) { appeared = true }+ withAnimation(.easeInOut(duration: 1.4).repeatForever(autoreverses: true)) {pulse = true}}@@ -40,22 +32,12 @@ struct PermissionSheet: View {private var header: some View {HStack(spacing: 14) {ZStack {+ let tint = coordinator.hasFullDiskAccess ? Tint.green : Tint.blueCircle()- .fill(- LinearGradient(- colors: coordinator.hasFullDiskAccess- ? [Tint.green, Color(red: 0.10, green: 0.65, blue: 0.40)]- : [Tint.blue, Tint.purple],- startPoint: .topLeading, endPoint: .bottomTrailing- )- )- .frame(width: 44, height: 44)- .shadow(- color: (coordinator.hasFullDiskAccess ? Tint.green : Tint.blue)- .opacity(pulse ? 0.45 : 0.15),- radius: pulse ? 14 : 6- )+ .fill(tint.opacity(0.14))+ .frame(width: 40, height: 40)headerIcon+ .foregroundStyle(tint)}VStack(alignment: .leading, spacing: 2) {@@ -80,8 +62,7 @@ struct PermissionSheet: View {private var headerIcon: some View {let name = coordinator.hasFullDiskAccess ? "checkmark.shield.fill" : "lock.shield.fill"let base = Image(systemName: name)- .font(.system(size: 20, weight: .semibold))- .foregroundStyle(.white)+ .font(.system(size: 18, weight: .semibold))if #available(macOS 14.0, *) {base.contentTransition(.symbolEffect(.replace))} else {@@ -102,38 +83,18 @@ struct PermissionSheet: View {private var requestBody: some View {VStack(alignment: .leading, spacing: 18) {- // Primary action row+ // Primary action — use the system's borderedProminent so the+ // button feels native rather than like a marketing CTA.Button {coordinator.openSettingsAndReveal()} label: {- HStack(spacing: 12) {- Image(systemName: "gear.badge")- .font(.system(size: 18, weight: .semibold))- VStack(alignment: .leading, spacing: 1) {- Text("Open Settings & reveal PureMac")- .font(.system(size: 13.5, weight: .semibold))- Text("We'll open both windows side-by-side.")- .font(.system(size: 11))- .opacity(0.85)- }- Spacer()- Image(systemName: "arrow.up.right")- .font(.system(size: 11, weight: .bold))- .opacity(0.7)- }- .foregroundStyle(.white)- .padding(.horizontal, 16)- .padding(.vertical, 14)- .background(- LinearGradient(- colors: [Tint.blue, Tint.purple],- startPoint: .leading, endPoint: .trailing- )- )- .clipShape(RoundedRectangle(cornerRadius: 12, style: .continuous))- .shadow(color: Tint.blue.opacity(0.35), radius: 10, y: 4)+ Label("Open Settings & reveal PureMac", systemImage: "gear")+ .font(.system(size: 13, weight: .semibold))+ .frame(maxWidth: .infinity)+ .padding(.vertical, 6)}- .buttonStyle(.plain)+ .buttonStyle(.borderedProminent)+ .controlSize(.large).keyboardShortcut(.defaultAction)// Step-by-step stripdiff --git a/PureMac/Views/DashboardView.swift b/PureMac/Views/DashboardView.swiftindex dd88a9b..e28e88b 100644--- a/PureMac/Views/DashboardView.swift+++ b/PureMac/Views/DashboardView.swift@@ -91,17 +91,10 @@ struct DashboardView: View {}}Text(ByteCountFormatter.string(fromByteCount: free, countStyle: .file))- .font(.system(size: 34, weight: .bold))+ .font(.system(size: 34, weight: .semibold)).monospacedDigit().contentTransition(.numericText())- .foregroundStyle(- LinearGradient(- colors: stress- ? [Tint.orange, Tint.red]- : [Color.primary, Color.primary.opacity(0.85)],- startPoint: .top, endPoint: .bottom- )- )+ .foregroundStyle(stress ? Tint.orange : Color.primary)Text(freeOfText(total: total)).font(.system(size: 12)).foregroundStyle(.secondary)@@ -343,13 +336,9 @@ struct DashboardView: View {HStack(alignment: .firstTextBaseline) {if !isClean {Text(ByteCountFormatter.string(fromByteCount: appState.totalJunkSize, countStyle: .file))- .font(.system(size: 40, weight: .bold))+ .font(.system(size: 40, weight: .semibold)).monospacedDigit().contentTransition(.numericText())- .foregroundStyle(- LinearGradient(colors: [Tint.orange, Tint.red],- startPoint: .top, endPoint: .bottom)- )Text("found").font(.system(size: 16)).foregroundStyle(.secondary)@@ -424,9 +413,8 @@ struct DashboardView: View {@ViewBuilderprivate var bigCheckmark: some View {let base = Image(systemName: "checkmark")- .font(.system(size: 60, weight: .bold))+ .font(.system(size: 54, weight: .semibold)).foregroundStyle(Tint.green)- .shadow(color: Tint.green.opacity(0.5), radius: 12)if #available(macOS 14.0, *) {base.symbolEffect(.bounce, value: appState.totalFreedSpace)} else {@@ -476,27 +464,16 @@ struct DashboardView: View {ZStack {Circle().fill(Tint.green.opacity(0.12))- .blur(radius: 20)- Circle()- .fill(- LinearGradient(colors: [Tint.green.opacity(0.30), Tint.green.opacity(0.10)],- startPoint: .topLeading, endPoint: .bottomTrailing)- )- Circle()- .strokeBorder(Tint.green.opacity(0.30), lineWidth: 2)bigCheckmark}- .frame(width: 140, height: 140)+ .frame(width: 120, height: 120)VStack(alignment: .leading, spacing: 6) {Text(ByteCountFormatter.string(fromByteCount: appState.totalFreedSpace, countStyle: .file))- .font(.system(size: 40, weight: .bold))+ .font(.system(size: 40, weight: .semibold)).monospacedDigit().contentTransition(.numericText())- .foregroundStyle(- LinearGradient(colors: [Tint.green, Color(red: 0.10, green: 0.65, blue: 0.40)],- startPoint: .top, endPoint: .bottom)- )+ .foregroundStyle(Tint.green)Text("freed").font(.system(size: 14)).foregroundStyle(.secondary)@@ -596,66 +573,34 @@ private struct SuggestionRow: View {private struct StorageGauge: View {let percentUsed: Double // 0...1- @State private var glow = falsevar body: some View {let pct = max(0, min(1, percentUsed))let displayPercent = Int(round(pct * 100))let stress = pct > 0.85- let primaryGradient: [Color] = stress- ? [Tint.orange, Tint.red]- : [Tint.blue, Tint.purple]+ let arcColor: Color = stress ? Tint.orange : Tint.blueZStack {- // Soft outer halo to give the ring depth.- Circle()- .fill(primaryGradient.first!.opacity(glow ? 0.18 : 0.10))- .blur(radius: 24)- .scaleEffect(0.95)-Circle()- .stroke(Color.primary.opacity(0.08), lineWidth: 14)+ .stroke(Color.primary.opacity(0.07), lineWidth: 10)Circle().trim(from: 0, to: CGFloat(pct))- .stroke(- AngularGradient(colors: primaryGradient + [primaryGradient.first!], center: .center),- style: StrokeStyle(lineWidth: 14, lineCap: .round)- )+ .stroke(arcColor, style: StrokeStyle(lineWidth: 10, lineCap: .round)).rotationEffect(.degrees(-90))- .shadow(color: primaryGradient.first!.opacity(0.45), radius: 10, y: 2)- .animation(.easeOut(duration: 0.8), value: pct)-- // Pulsing dot at the arc tip — adds life without distracting.- Circle()- .fill(Color.white)- .frame(width: 8, height: 8)- .overlay(Circle().fill(primaryGradient.last!).frame(width: 4, height: 4))- .shadow(color: primaryGradient.last!.opacity(0.6), radius: 4)- .offset(y: -80)- .rotationEffect(.degrees(360 * pct))- .opacity(pct > 0.02 ? 1 : 0)- .animation(.easeOut(duration: 0.8), value: pct)+ .animation(.easeOut(duration: 0.7), value: pct)VStack(spacing: 2) {Text("\(displayPercent)%")- .font(.system(size: 46, weight: .bold))+ .font(.system(size: 44, weight: .semibold)).monospacedDigit().contentTransition(.numericText())- .foregroundStyle(- LinearGradient(colors: primaryGradient, startPoint: .top, endPoint: .bottom)- )Text("USED")- .font(.system(size: 10, weight: .semibold))+ .font(.system(size: 10, weight: .medium)).tracking(0.6).foregroundStyle(.secondary)}}- .onAppear {- withAnimation(.easeInOut(duration: 1.8).repeatForever(autoreverses: true)) {- glow = true- }- }}}@@ -684,50 +629,30 @@ private struct ScanningGauge: View {var tint: Color = Tint.bluevar label: LocalizedStringKey = "SCANNING"@State private var rotate = false- @State private var shimmer = falsevar body: some View {ZStack {- // Halo- Circle()- .fill(tint.opacity(shimmer ? 0.20 : 0.10))- .blur(radius: 24)- .scaleEffect(0.95)-Circle()- .stroke(Color.primary.opacity(0.08), lineWidth: 14)+ .stroke(Color.primary.opacity(0.07), lineWidth: 10)- // Progress arcCircle().trim(from: 0, to: CGFloat(max(0.05, min(0.95, progress))))- .stroke(- AngularGradient(colors: [tint, Tint.green, tint], center: .center),- style: StrokeStyle(lineWidth: 14, lineCap: .round)- )+ .stroke(tint, style: StrokeStyle(lineWidth: 10, lineCap: .round)).rotationEffect(.degrees(rotate ? 360 : 0))- .shadow(color: tint.opacity(0.45), radius: 10, y: 2).animation(.linear(duration: 4).repeatForever(autoreverses: false), value: rotate)VStack(spacing: 2) {Text("\(Int(progress * 100))%")- .font(.system(size: 38, weight: .bold))+ .font(.system(size: 36, weight: .semibold)).monospacedDigit().contentTransition(.numericText())- .foregroundStyle(- LinearGradient(colors: [tint, Tint.green], startPoint: .top, endPoint: .bottom)- )Text(label)- .font(.system(size: 10, weight: .semibold))+ .font(.system(size: 10, weight: .medium)).tracking(0.6).foregroundStyle(.secondary)}}- .onAppear {- rotate = true- withAnimation(.easeInOut(duration: 1.4).repeatForever(autoreverses: true)) {- shimmer = true- }- }+ .onAppear { rotate = true }}}diff --git a/PureMac/Views/MainWindow.swift b/PureMac/Views/MainWindow.swiftindex d43f7e2..e1784b5 100644--- a/PureMac/Views/MainWindow.swift+++ b/PureMac/Views/MainWindow.swift@@ -150,25 +150,13 @@ struct MainWindow: View {}Spacer()if !ok {- Button {+ Button("Fix") {permission.requestAccess(context: .general) {appState.checkFullDiskAccess()}- } label: {- Image(systemName: "wrench.and.screwdriver.fill")- .font(.system(size: 11, weight: .semibold))- .foregroundStyle(.white)- .padding(.horizontal, 9)- .padding(.vertical, 5)- .background(- Capsule().fill(- LinearGradient(colors: [Tint.orange, Color(red: 1, green: 0.42, blue: 0.0)],- startPoint: .topLeading, endPoint: .bottomTrailing)- )- )- .shadow(color: Tint.orange.opacity(0.45), radius: 5, y: 2)}- .buttonStyle(.plain)+ .buttonStyle(.bordered)+ .controlSize(.small).help("Fix permission")}}@@ -226,69 +214,51 @@ struct MainWindow: View {pulsingLockIconView()}- // Premium FDA toast — gradient backdrop, glow, primary action plus a- // subtle dismiss. Visually distinct enough that users actually notice- // and act on it without it screaming.+ // Quiet FDA bar — single tinted surface, no gradient or glow.private var fdaToast: some View {- HStack(spacing: 14) {- ZStack {- RoundedRectangle(cornerRadius: 10, style: .continuous)- .fill(Color.white.opacity(0.22))- pulsingLockIcon- }- .frame(width: 40, height: 40)+ HStack(spacing: 12) {+ IconTile(systemName: "lock.shield.fill", tint: Tint.orange, size: 32, corner: 8)- VStack(alignment: .leading, spacing: 2) {+ VStack(alignment: .leading, spacing: 1) {Text("Full Disk Access required")- .font(.system(size: 14, weight: .bold))- .foregroundStyle(.white)+ .font(.system(size: 13, weight: .semibold))Text("1-tap setup. We'll auto-retry what failed.").font(.system(size: 11.5))- .foregroundStyle(.white.opacity(0.92))+ .foregroundStyle(.secondary)}Spacer()- Button {+ Button("Set up") {permission.requestAccess(context: .general) {appState.checkFullDiskAccess()}- } label: {- Label("Quick Setup", systemImage: "sparkles")- .font(.system(size: 12.5, weight: .semibold))- .padding(.horizontal, 6)}.buttonStyle(.borderedProminent)- .tint(.white)- .foregroundStyle(Tint.orange)- .controlSize(.large)+ .controlSize(.regular)Button {appState.fdaBannerDismissed = true} label: {Image(systemName: "xmark")- .font(.system(size: 11, weight: .bold))- .foregroundStyle(.white.opacity(0.85))- .padding(8)- .background(Circle().fill(Color.white.opacity(0.10)))+ .font(.system(size: 10, weight: .semibold))+ .foregroundStyle(.secondary)+ .padding(6)+ .contentShape(Rectangle())}.buttonStyle(.plain).help("Dismiss")}- .padding(.horizontal, 16)- .padding(.vertical, 12)+ .padding(.horizontal, 14)+ .padding(.vertical, 10).background(- ZStack {- RoundedRectangle(cornerRadius: 14, style: .continuous)- .fill(- LinearGradient(colors: [Tint.orange, Color(red: 1.0, green: 0.42, blue: 0.0)],- startPoint: .topLeading, endPoint: .bottomTrailing)- )- RoundedRectangle(cornerRadius: 14, style: .continuous)- .strokeBorder(Color.white.opacity(0.18), lineWidth: 0.5)- }+ RoundedRectangle(cornerRadius: 10, style: .continuous)+ .fill(Tint.orange.opacity(0.08))+ )+ .overlay(+ RoundedRectangle(cornerRadius: 10, style: .continuous)+ .strokeBorder(Tint.orange.opacity(0.22), lineWidth: 0.5))- .shadow(color: Tint.orange.opacity(0.45), radius: 14, y: 6)}}diff --git a/PureMac/Views/OnboardingView.swift b/PureMac/Views/OnboardingView.swiftindex f0ece19..be93a3b 100644--- a/PureMac/Views/OnboardingView.swift+++ b/PureMac/Views/OnboardingView.swift@@ -1,434 +1,411 @@import SwiftUI+/// First-launch flow. Four scenes, large typography, plenty of breathing+/// room. Sequence is welcome → mission → permission (with live demo) →+/// ready. Skip is always available — we don't want to gate adoption on a+/// reluctant user, but we do want to make the FDA step concrete enough that+/// the people who *want* to grant it understand exactly what they're doing.struct OnboardingView: View {@Binding var isComplete: Bool- @State private var currentPage = 0- @State private var hasFullDiskAccess = false+ @State private var page: Page = .welcome@State private var appeared = false+ @State private var hasFda = false@State private var hasOpenedSettings = false- @State private var showDiagnostics = false- // Per-path access checks- @State private var accessResults: [ProtectedPath] = ProtectedPath.allPaths+ private let pollTimer = Timer.publish(every: 1.0, on: .main, in: .common).autoconnect()- private let timer = Timer.publish(every: 1.0, on: .main, in: .common).autoconnect()+ enum Page: Int, CaseIterable {+ case welcome, mission, permission, ready- var body: some View {- VStack(spacing: 0) {- // Page content- Group {- switch currentPage {- case 0: welcomePage- case 1: fdaPage- case 2: readyPage- default: EmptyView()- }- }- .frame(maxWidth: .infinity, maxHeight: .infinity)-- Divider()-- // Navigation- HStack {- if currentPage > 0 {- Button("Back") {- withAnimation(.spring(response: 0.4, dampingFraction: 0.85)) {- currentPage -= 1- }- }- .transition(.opacity)- }-- Spacer()-- // Page dots- HStack(spacing: 8) {- ForEach(0..<3, id: \.self) { i in- Circle()- .fill(i == currentPage ? Color.accentColor : Color.secondary.opacity(0.3))- .frame(width: 8, height: 8)- .scaleEffect(i == currentPage ? 1.2 : 1.0)- .animation(.spring(response: 0.3, dampingFraction: 0.6), value: currentPage)- }- }-- Spacer()+ var index: Int { rawValue }+ static var count: Int { allCases.count }+ }- if currentPage < 2 {- Button("Next") {- withAnimation(.spring(response: 0.4, dampingFraction: 0.85)) {- currentPage += 1- }- }- .buttonStyle(.borderedProminent)- } else {- Button("Get Started") { isComplete = true }- .buttonStyle(.borderedProminent)- }+ var body: some View {+ ZStack {+ backdrop+ .ignoresSafeArea()++ VStack(spacing: 0) {+ content+ .frame(maxWidth: .infinity, maxHeight: .infinity)+ .padding(.horizontal, 36)+ .padding(.top, 44)+ .padding(.bottom, 12)+ .id(page)+ .transition(+ .asymmetric(+ insertion: .opacity.combined(with: .move(edge: .trailing)),+ removal: .opacity.combined(with: .move(edge: .leading))+ )+ )++ bottomBar}- .padding()}- .frame(width: 560, height: 460)+ .frame(width: 680, height: 560).onAppear {- withAnimation(.easeOut(duration: 0.6).delay(0.1)) {- appeared = true- }+ FullDiskAccessManager.shared.triggerRegistration()+ withAnimation(.easeOut(duration: 0.5)) { appeared = true }+ refreshFda()}- .onReceive(timer) { _ in- if currentPage == 1 {- refreshAccessChecks()- }+ .onReceive(pollTimer) { _ in+ if page == .permission { refreshFda() }}}- // MARK: - Welcome+ @ViewBuilder+ private var content: some View {+ switch page {+ case .welcome: WelcomeScene(appeared: appeared)+ case .mission: MissionScene()+ case .permission: PermissionScene(+ hasFda: hasFda,+ hasOpenedSettings: hasOpenedSettings,+ openSettings: openSettings,+ revealAppInFinder: { FullDiskAccessManager.shared.revealAppInFinder() }+ )+ case .ready: ReadyScene(hasFda: hasFda)+ }+ }- private var welcomePage: some View {- VStack(spacing: 24) {- Spacer()+ // MARK: - Background++ private var backdrop: some View {+ ZStack {+ Color(nsColor: .windowBackgroundColor)+ // Radial wash that shifts hue per page. Subtle enough to read+ // as ambient warmth rather than decoration.+ RadialGradient(+ colors: [pageTint.opacity(0.18), .clear],+ center: .topTrailing,+ startRadius: 60,+ endRadius: 520+ )+ .animation(.easeInOut(duration: 0.6), value: page)+ }+ }- if let icon = NSImage(named: "AppIcon") {- Image(nsImage: icon)- .resizable()- .frame(width: 96, height: 96)- .scaleEffect(appeared ? 1.0 : 0.5)- .opacity(appeared ? 1 : 0)- }+ private var pageTint: Color {+ switch page {+ case .welcome: return Tint.blue+ case .mission: return Tint.purple+ case .permission: return Tint.orange+ case .ready: return Tint.green+ }+ }- VStack(spacing: 8) {- Text("Welcome to PureMac")- .font(.largeTitle.bold())- .opacity(appeared ? 1 : 0)- .offset(y: appeared ? 0 : 10)+ // MARK: - Bottom bar- Text("Free, open-source macOS app manager and system cleaner.")+ private var bottomBar: some View {+ HStack {+ if page != .welcome {+ Button("Back") { advance(by: -1) }+ .buttonStyle(.plain)+ .foregroundStyle(.secondary)+ } else {+ Button("Skip") { isComplete = true }+ .buttonStyle(.plain).foregroundStyle(.secondary)- .multilineTextAlignment(.center)- .opacity(appeared ? 1 : 0)- .offset(y: appeared ? 0 : 10)}- HStack(spacing: 20) {- featureCard(- icon: "magnifyingglass",- title: "Smart Scan",- desc: "Find junk files across your system",- delay: 0.15- )- featureCard(- icon: "trash",- title: "App Uninstaller",- desc: "Remove apps and all their files",- delay: 0.25- )- featureCard(- icon: "doc.questionmark",- title: "Orphan Finder",- desc: "Find leftovers from deleted apps",- delay: 0.35- )+ Spacer()++ HStack(spacing: 6) {+ ForEach(Page.allCases, id: \.self) { p in+ Capsule()+ .fill(p == page ? Color.primary.opacity(0.75) : Color.primary.opacity(0.15))+ .frame(width: p == page ? 18 : 6, height: 6)+ .animation(.spring(response: 0.35, dampingFraction: 0.85), value: page)+ }}- .padding(.top, 4)Spacer()- }- .padding()- .transition(.asymmetric(- insertion: .move(edge: .trailing).combined(with: .opacity),- removal: .move(edge: .leading).combined(with: .opacity)- ))- }- private func featureCard(icon: String, title: LocalizedStringKey, desc: LocalizedStringKey, delay: Double) -> some View {- VStack(spacing: 8) {- Image(systemName: icon)- .font(.title2)- .foregroundStyle(Color.accentColor)- Text(title)- .font(.callout.bold())- Text(desc)- .font(.caption)- .foregroundStyle(.secondary)- .multilineTextAlignment(.center)+ if page == .ready {+ Button("Start") { isComplete = true }+ .buttonStyle(.borderedProminent)+ .controlSize(.large)+ } else {+ Button(page == .permission ? "Continue" : "Next") { advance(by: 1) }+ .buttonStyle(.borderedProminent)+ .controlSize(.large)+ }}- .frame(width: 140)- .opacity(appeared ? 1 : 0)- .offset(y: appeared ? 0 : 20)- .animation(.easeOut(duration: 0.5).delay(delay), value: appeared)+ .padding(.horizontal, 28)+ .padding(.vertical, 16)+ .background(+ VStack(spacing: 0) {+ Divider().opacity(0.5)+ Color.clear+ }+ )}- // MARK: - Full Disk Access-- private var fdaPage: some View {- VStack(spacing: 14) {- Image(systemName: hasFullDiskAccess ? "checkmark.shield.fill" : "lock.shield")- .font(.system(size: 40))- .foregroundStyle(hasFullDiskAccess ? .green : .orange)- .animation(.easeInOut(duration: 0.3), value: hasFullDiskAccess)- .padding(.top, 8)-- Text("Full Disk Access")- .font(.title2.bold())-- if hasFullDiskAccess {- grantedView- } else if hasOpenedSettings {- instructionsView- } else {- introView- }+ // MARK: - Actions- Spacer(minLength: 0)+ private func advance(by delta: Int) {+ let target = max(0, min(Page.count - 1, page.index + delta))+ withAnimation(.spring(response: 0.45, dampingFraction: 0.85)) {+ page = Page(rawValue: target) ?? page}- .padding(.horizontal)- .padding(.bottom, 8)- .onAppear {- FullDiskAccessManager.shared.triggerRegistration()- refreshAccessChecks()+ }++ private func openSettings() {+ FullDiskAccessManager.shared.openFullDiskAccessSettings()+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {+ FullDiskAccessManager.shared.revealAppInFinder()}- .onChange(of: hasFullDiskAccess) { granted in- if granted, currentPage == 1 {- DispatchQueue.main.asyncAfter(deadline: .now() + 0.8) {- withAnimation(.spring(response: 0.4, dampingFraction: 0.85)) {- currentPage = 2- }- }- }+ withAnimation(.easeInOut(duration: 0.25)) {+ hasOpenedSettings = true}- .transition(.asymmetric(- insertion: .move(edge: .trailing).combined(with: .opacity),- removal: .move(edge: .leading).combined(with: .opacity)- ))}- private var introView: some View {- VStack(spacing: 12) {- Text("PureMac needs Full Disk Access to uninstall apps, find leftover files, and clean protected caches.")- .foregroundStyle(.secondary)- .multilineTextAlignment(.center)- .frame(maxWidth: 420)-- Button {- openSettingsAndAdvance()- } label: {- Label("Open System Settings", systemImage: "gear")- .frame(minWidth: 200)+ private func refreshFda() {+ let granted = FullDiskAccessManager.shared.hasFullDiskAccess+ if granted != hasFda {+ withAnimation(.easeInOut(duration: 0.3)) {+ hasFda = granted+ }+ }+ // Auto-advance once they grant access while on the permission page.+ if granted, page == .permission {+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.8) {+ advance(by: 1)}- .buttonStyle(.borderedProminent)- .controlSize(.large)- .keyboardShortcut(.defaultAction)- .padding(.top, 4)-- Text("We'll guide you through the next steps.")- .font(.caption)- .foregroundStyle(.tertiary)}}+}- private var instructionsView: some View {- VStack(spacing: 10) {- Text("In System Settings, do this:")- .font(.callout)- .foregroundStyle(.secondary)+// MARK: - Scenes- VStack(alignment: .leading, spacing: 8) {- stepRow(number: 1, text: "Privacy & Security → Full Disk Access")- stepRow(number: 2, text: "Find **PureMac** and turn the toggle on")- stepRow(number: 3, text: "Authenticate with Touch ID or your password")- }- .frame(maxWidth: 420, alignment: .leading)+private struct WelcomeScene: View {+ let appeared: Bool+ @State private var bob = false- HStack(spacing: 8) {- Button {- FullDiskAccessManager.shared.openFullDiskAccessSettings()- } label: {- Label("Reopen Settings", systemImage: "gear")- }+ var body: some View {+ VStack(spacing: 26) {+ Spacer(minLength: 0)- Menu {- Button("PureMac isn't in the list — reveal it") {- FullDiskAccessManager.shared.revealAppInFinder()- }- Button("Reset permissions and re-prompt") {- _ = FullDiskAccessManager.shared.resetFullDiskAccess()- FullDiskAccessManager.shared.triggerRegistration()- refreshAccessChecks()- }- Divider()- Button(LocalizedStringKey(showDiagnostics ? "Hide diagnostics" : "Show diagnostics")) {- showDiagnostics.toggle()- }- } label: {- Label("Trouble?", systemImage: "questionmark.circle")+ ZStack {+ if let icon = NSImage(named: "AppIcon") {+ Image(nsImage: icon)+ .resizable()+ .interpolation(.high)+ .frame(width: 120, height: 120)+ .shadow(color: .black.opacity(0.15), radius: 18, y: 8)+ .offset(y: bob ? -4 : 4)+ .onAppear {+ withAnimation(.easeInOut(duration: 2.4).repeatForever(autoreverses: true)) {+ bob = true+ }+ }+ } else {+ Image(systemName: "sparkles")+ .font(.system(size: 88, weight: .semibold))+ .foregroundStyle(Tint.blue)}- .menuStyle(.borderlessButton)- .fixedSize()}- .padding(.top, 4)- HStack(spacing: 6) {- ProgressView().controlSize(.small)- Text("Waiting for permission…")- .font(.caption)+ VStack(spacing: 12) {+ Text("Reclaim your Mac")+ .font(.system(size: 38, weight: .semibold))+ .multilineTextAlignment(.center)+ Text("Apple sells you small disks. We help you keep them clean.")+ .font(.system(size: 15)).foregroundStyle(.secondary)+ .multilineTextAlignment(.center)+ .frame(maxWidth: 420)}- .padding(.top, 2)+ .opacity(appeared ? 1 : 0)+ .offset(y: appeared ? 0 : 8)- if showDiagnostics {- diagnosticsList- }- }- }+ Text("Free. Open source. MIT licensed.")+ .font(.system(size: 11.5, weight: .medium))+ .foregroundStyle(.tertiary)+ .tracking(0.3)+ .padding(.top, 4)- private var grantedView: some View {- VStack(spacing: 8) {- Text("Permission granted.")- .foregroundStyle(.green)- .font(.callout.weight(.semibold))- Text("PureMac can now manage protected files.")- .font(.caption)- .foregroundStyle(.secondary)+ Spacer(minLength: 0)}- .transition(.opacity.combined(with: .scale))}+}- private func stepRow(number: Int, text: LocalizedStringKey) -> some View {- HStack(alignment: .firstTextBaseline, spacing: 10) {- Text("\(number)")- .font(.callout.bold())- .foregroundStyle(.white)- .frame(width: 22, height: 22)- .background(Circle().fill(Color.accentColor))- Text(text)- .font(.callout)- Spacer()- }- }+private struct MissionScene: View {+ var body: some View {+ VStack(spacing: 28) {+ Spacer(minLength: 0)- private var diagnosticsList: some View {- VStack(alignment: .leading, spacing: 4) {- ForEach(accessResults) { path in- HStack(spacing: 8) {- Image(systemName: path.accessible ? "checkmark.circle.fill" : "xmark.circle")- .foregroundStyle(path.accessible ? .green : .red.opacity(0.7))- .font(.system(size: 11))- Image(systemName: path.icon)- .foregroundStyle(.secondary)- .frame(width: 14)- Text(LocalizedStringKey(path.label))- .font(.caption)- Spacer()- Text(LocalizedStringKey(path.accessible ? "OK" : "Blocked"))- .font(.caption2)- .foregroundStyle(path.accessible ? .green : .orange)- }+ VStack(spacing: 12) {+ Text("What's inside")+ .font(.system(size: 30, weight: .semibold))+ .multilineTextAlignment(.center)+ Text("Three things, done well.")+ .font(.system(size: 14))+ .foregroundStyle(.secondary)}++ VStack(spacing: 12) {+ FeatureRow(+ systemImage: "sparkles",+ tint: Tint.blue,+ title: "Smart Scan",+ body: "Find caches, logs, broken installs, and the AI-app history hiding in your library."+ )+ FeatureRow(+ systemImage: "square.grid.2x2.fill",+ tint: Tint.purple,+ title: "App Uninstaller",+ body: "Drag an app, see every file it dropped, remove all of it. No leftovers."+ )+ FeatureRow(+ systemImage: "doc.questionmark.fill",+ tint: Tint.pink,+ title: "Orphan Finder",+ body: "Surfaces files that outlived the apps that created them."+ )+ }+ .frame(maxWidth: 460)++ Spacer(minLength: 0)}- .frame(maxWidth: 360)- .padding(8)- .background(RoundedRectangle(cornerRadius: 6).fill(Color.secondary.opacity(0.08)))}+}- private func openSettingsAndAdvance() {- FullDiskAccessManager.shared.openFullDiskAccessSettings()- withAnimation(.easeInOut(duration: 0.25)) {- hasOpenedSettings = true+private struct FeatureRow: View {+ let systemImage: String+ let tint: Color+ let title: String+ let body_: String++ init(systemImage: String, tint: Color, title: String, body: String) {+ self.systemImage = systemImage+ self.tint = tint+ self.title = title+ self.body_ = body+ }++ var body: some View {+ HStack(alignment: .top, spacing: 14) {+ IconTile(systemName: systemImage, tint: tint, size: 36, corner: 9)+ VStack(alignment: .leading, spacing: 2) {+ Text(title)+ .font(.system(size: 14, weight: .semibold))+ Text(body_)+ .font(.system(size: 12.5))+ .foregroundStyle(.secondary)+ .fixedSize(horizontal: false, vertical: true)+ }+ Spacer()}+ .padding(14)+ .background(+ RoundedRectangle(cornerRadius: 10, style: .continuous)+ .fill(Color.primary.opacity(0.04))+ )}+}- // MARK: - Ready+private struct PermissionScene: View {+ let hasFda: Bool+ let hasOpenedSettings: Bool+ let openSettings: () -> Void+ let revealAppInFinder: () -> Void- private var readyPage: some View {+ var body: some View {VStack(spacing: 20) {- Spacer()+ VStack(spacing: 10) {+ Text(hasFda ? "Permission granted" : "One permission, then we're done")+ .font(.system(size: 26, weight: .semibold))+ .multilineTextAlignment(.center)+ Text(hasFda+ ? "PureMac can now reach the locations macOS protects by default."+ : "macOS hides certain folders from every app until you say otherwise. We need them to find caches and uninstall cleanly.")+ .font(.system(size: 13))+ .foregroundStyle(.secondary)+ .multilineTextAlignment(.center)+ .frame(maxWidth: 460)+ }- Image(systemName: "checkmark.circle.fill")- .font(.system(size: 64))- .foregroundStyle(.green)- .scaleEffect(appeared ? 1.0 : 0.3)- .animation(.spring(response: 0.5, dampingFraction: 0.6), value: currentPage)-- Text("You're Ready")- .font(.title.bold())-- // Summary of access- let granted = accessResults.filter(\.accessible).count- let total = accessResults.count-- VStack(spacing: 8) {- HStack(spacing: 8) {- Image(systemName: hasFullDiskAccess ? "checkmark.circle.fill" : "exclamationmark.triangle.fill")- .foregroundStyle(hasFullDiskAccess ? .green : .orange)- Text(grantedSummary(granted: granted, total: total))- .foregroundStyle(.secondary)- }+ FDADemoView()+ .frame(maxWidth: 440)- if !hasFullDiskAccess {- Text("Some features will be limited. You can grant Full Disk Access later in System Settings.")- .font(.caption)- .foregroundStyle(.orange)- .multilineTextAlignment(.center)- .frame(maxWidth: 360)+ if hasFda {+ Label("All set — moving you to the next step.", systemImage: "checkmark.circle.fill")+ .font(.system(size: 12.5, weight: .medium))+ .foregroundStyle(Tint.green)+ .transition(.opacity.combined(with: .scale))+ } else {+ VStack(spacing: 6) {+ Button {+ openSettings()+ } label: {+ Label(hasOpenedSettings ? "Reopen Settings" : "Open Settings & reveal PureMac",+ systemImage: "gear")+ .font(.system(size: 13, weight: .semibold))+ .frame(minWidth: 280)+ .padding(.vertical, 4)+ }+ .buttonStyle(.borderedProminent)+ .controlSize(.large)+ .keyboardShortcut(.defaultAction)++ if hasOpenedSettings {+ HStack(spacing: 14) {+ Button("Reveal app again") { revealAppInFinder() }+ .buttonStyle(.link)+ .font(.system(size: 11.5))+ Button("Reset permissions") {+ _ = FullDiskAccessManager.shared.resetFullDiskAccess()+ FullDiskAccessManager.shared.triggerRegistration()+ }+ .buttonStyle(.link)+ .font(.system(size: 11.5))+ }+ .transition(.opacity)+ }}}-- Spacer()}- .padding()- .transition(.asymmetric(- insertion: .move(edge: .trailing).combined(with: .opacity),- removal: .move(edge: .leading).combined(with: .opacity)- ))}+}- private func grantedSummary(granted: Int, total: Int) -> String {- String(- format: String(localized: "%lld/%lld protected locations accessible"),- Int64(granted),- Int64(total)- )- }+private struct ReadyScene: View {+ let hasFda: Bool+ @State private var bounce = false- // MARK: - Permission Checking+ var body: some View {+ VStack(spacing: 22) {+ Spacer(minLength: 0)- private func refreshAccessChecks() {- for i in accessResults.indices {- let path = accessResults[i].path- let canAccess: Bool- if FileManager.default.fileExists(atPath: path) {- canAccess = FileManager.default.isReadableFile(atPath: path)- } else {- // Path doesn't exist on this system — not blocked, just absent- canAccess = true+ ZStack {+ Circle()+ .fill((hasFda ? Tint.green : Tint.orange).opacity(0.12))+ .frame(width: 110, height: 110)+ Image(systemName: hasFda ? "checkmark" : "hand.wave.fill")+ .font(.system(size: 50, weight: .semibold))+ .foregroundStyle(hasFda ? Tint.green : Tint.orange)+ .scaleEffect(bounce ? 1.05 : 1.0)}- if accessResults[i].accessible != canAccess {- withAnimation(.easeInOut(duration: 0.3)) {- accessResults[i].accessible = canAccess+ .onAppear {+ withAnimation(.spring(response: 0.5, dampingFraction: 0.55)) {+ bounce = true}}- }- hasFullDiskAccess = accessResults.allSatisfy(\.accessible)- }-}-// MARK: - Protected Path Model--struct ProtectedPath: Identifiable {- let id = UUID()- let label: String- let path: String- let icon: String- var accessible: Bool = false-- static var allPaths: [ProtectedPath] {- let home = FileManager.default.homeDirectoryForCurrentUser.path- return [- ProtectedPath(label: "Trash", path: "\(home)/.Trash", icon: "trash"),- ProtectedPath(label: "Mail Data", path: "\(home)/Library/Mail", icon: "envelope"),- ProtectedPath(label: "Safari Data", path: "\(home)/Library/Safari/Bookmarks.plist", icon: "safari"),- ProtectedPath(label: "Desktop", path: "\(home)/Desktop", icon: "menubar.dock.rectangle"),- ProtectedPath(label: "Documents", path: "\(home)/Documents", icon: "folder"),- ProtectedPath(label: "TCC Database", path: "/Library/Application Support/com.apple.TCC/TCC.db", icon: "lock.shield"),- ]+ VStack(spacing: 10) {+ Text(hasFda ? "You're ready" : "Ready when you are")+ .font(.system(size: 30, weight: .semibold))+ Text(hasFda+ ? "Hit Start to run your first Smart Scan."+ : "Some features will be limited without Full Disk Access. You can grant it later in Settings.")+ .font(.system(size: 13.5))+ .foregroundStyle(.secondary)+ .multilineTextAlignment(.center)+ .frame(maxWidth: 420)+ }++ Spacer(minLength: 0)+ }}}diff --git a/PureMac/ar.lproj/Localizable.strings b/PureMac/ar.lproj/Localizable.stringsindex 4196c0e..3b957a3 100644--- a/PureMac/ar.lproj/Localizable.strings+++ b/PureMac/ar.lproj/Localizable.strings@@ -301,3 +301,26 @@"1-tap setup. We'll auto-retry what failed." = "إعداد بضغطة واحدة. سنعيد المحاولة تلقائيًا.";"Fix permission" = "إصلاح الإذن";"Dismiss" = "تجاهل";++/* Onboarding v2 */+"Reclaim your Mac" = "استعد جهاز Mac الخاص بك";+"Apple sells you small disks. We help you keep them clean." = "تبيعك Apple أقراصًا صغيرة. ونساعدك على إبقائها نظيفة.";+"Free. Open source. MIT licensed." = "مجاني. مفتوح المصدر. ترخيص MIT.";+"What's inside" = "ما الذي بالداخل";+"Three things, done well." = "ثلاثة أشياء، تُنجز بإتقان.";+"Find caches, logs, broken installs, and the AI-app history hiding in your library." = "ابحث عن الذاكرات المؤقتة والسجلات والتنصيبات المعطوبة وسجل تطبيقات الذكاء الاصطناعي المخبأ.";+"Drag an app, see every file it dropped, remove all of it. No leftovers." = "اسحب تطبيقًا، شاهد كل ملف تركه، احذف كل شيء. بدون بقايا.";+"Surfaces files that outlived the apps that created them." = "تبرز الملفات التي عاشت بعد التطبيقات التي أنشأتها.";+"One permission, then we're done" = "إذن واحد فقط، ثم ننتهي";+"Permission granted" = "تم منح الإذن";+"PureMac can now reach the locations macOS protects by default." = "يستطيع PureMac الآن الوصول إلى المواقع التي يحميها macOS افتراضيًا.";+"macOS hides certain folders from every app until you say otherwise. We need them to find caches and uninstall cleanly." = "يخفي macOS بعض المجلدات عن كل تطبيق حتى تسمح بذلك. نحتاجها للعثور على الذاكرات المؤقتة وإلغاء التثبيت بنظافة.";+"All set — moving you to the next step." = "كل شيء جاهز - ننقلك إلى الخطوة التالية.";+"Reveal app again" = "إظهار التطبيق مرة أخرى";+"Reset permissions" = "إعادة تعيين الأذونات";+"You're ready" = "أنت جاهز";+"Ready when you are" = "جاهز عندما تكون مستعدًا";+"Hit Start to run your first Smart Scan." = "اضغط ابدأ لتشغيل أول فحص ذكي.";+"Skip" = "تخطي";+"Start" = "ابدأ";+"Continue" = "متابعة";diff --git a/PureMac/en.lproj/Localizable.strings b/PureMac/en.lproj/Localizable.stringsindex a870a16..a24185e 100644--- a/PureMac/en.lproj/Localizable.strings+++ b/PureMac/en.lproj/Localizable.strings@@ -301,3 +301,26 @@/* Notifications */"Found %@ of junk files." = "Found %@ of junk files.";++/* Onboarding v2 */+"Reclaim your Mac" = "Reclaim your Mac";+"Apple sells you small disks. We help you keep them clean." = "Apple sells you small disks. We help you keep them clean.";+"Free. Open source. MIT licensed." = "Free. Open source. MIT licensed.";+"What's inside" = "What's inside";+"Three things, done well." = "Three things, done well.";+"Find caches, logs, broken installs, and the AI-app history hiding in your library." = "Find caches, logs, broken installs, and the AI-app history hiding in your library.";+"Drag an app, see every file it dropped, remove all of it. No leftovers." = "Drag an app, see every file it dropped, remove all of it. No leftovers.";+"Surfaces files that outlived the apps that created them." = "Surfaces files that outlived the apps that created them.";+"One permission, then we're done" = "One permission, then we're done";+"Permission granted" = "Permission granted";+"PureMac can now reach the locations macOS protects by default." = "PureMac can now reach the locations macOS protects by default.";+"macOS hides certain folders from every app until you say otherwise. We need them to find caches and uninstall cleanly." = "macOS hides certain folders from every app until you say otherwise. We need them to find caches and uninstall cleanly.";+"All set — moving you to the next step." = "All set — moving you to the next step.";+"Reveal app again" = "Reveal app again";+"Reset permissions" = "Reset permissions";+"You're ready" = "You're ready";+"Ready when you are" = "Ready when you are";+"Hit Start to run your first Smart Scan." = "Hit Start to run your first Smart Scan.";+"Skip" = "Skip";+"Start" = "Start";+"Continue" = "Continue";diff --git a/PureMac/es.lproj/Localizable.strings b/PureMac/es.lproj/Localizable.stringsindex e091c0d..9472637 100644--- a/PureMac/es.lproj/Localizable.strings+++ b/PureMac/es.lproj/Localizable.strings@@ -301,3 +301,26 @@"1-tap setup. We'll auto-retry what failed." = "Configuración en un toque. Reintentaremos automáticamente lo que falle.";"Fix permission" = "Arreglar permiso";"Dismiss" = "Descartar";++/* Onboarding v2 */+"Reclaim your Mac" = "Recupera tu Mac";+"Apple sells you small disks. We help you keep them clean." = "Apple te vende discos pequeños. Te ayudamos a mantenerlos limpios.";+"Free. Open source. MIT licensed." = "Gratis. Código abierto. Licencia MIT.";+"What's inside" = "Qué hay dentro";+"Three things, done well." = "Tres cosas, bien hechas.";+"Find caches, logs, broken installs, and the AI-app history hiding in your library." = "Encuentra cachés, registros, instalaciones rotas y el historial de apps de IA escondido en tu biblioteca.";+"Drag an app, see every file it dropped, remove all of it. No leftovers." = "Arrastra una app, ve cada archivo que dejó, elimínalo todo. Sin sobras.";+"Surfaces files that outlived the apps that created them." = "Encuentra archivos que sobrevivieron a las apps que los crearon.";+"One permission, then we're done" = "Un permiso y listo";+"Permission granted" = "Permiso concedido";+"PureMac can now reach the locations macOS protects by default." = "PureMac ya puede acceder a las ubicaciones que macOS protege por defecto.";+"macOS hides certain folders from every app until you say otherwise. We need them to find caches and uninstall cleanly." = "macOS oculta ciertas carpetas hasta que tú lo decides. Las necesitamos para encontrar cachés y desinstalar limpiamente.";+"All set — moving you to the next step." = "Todo listo - pasando al siguiente paso.";+"Reveal app again" = "Mostrar app de nuevo";+"Reset permissions" = "Restablecer permisos";+"You're ready" = "Listo";+"Ready when you are" = "Listos cuando lo estés";+"Hit Start to run your first Smart Scan." = "Pulsa Empezar para tu primer Smart Scan.";+"Skip" = "Omitir";+"Start" = "Empezar";+"Continue" = "Continuar";diff --git a/PureMac/ja.lproj/Localizable.strings b/PureMac/ja.lproj/Localizable.stringsindex 8a517cd..aea305d 100644--- a/PureMac/ja.lproj/Localizable.strings+++ b/PureMac/ja.lproj/Localizable.strings@@ -301,3 +301,26 @@"1-tap setup. We'll auto-retry what failed." = "ワンタップ設定。失敗した処理は自動的に再試行します。";"Fix permission" = "権限を修正";"Dismiss" = "閉じる";++/* Onboarding v2 */+"Reclaim your Mac" = "Mac を取り戻そう";+"Apple sells you small disks. We help you keep them clean." = "Apple のストレージは小さい。だからこそ、きれいに保ちます。";+"Free. Open source. MIT licensed." = "無料。オープンソース。MIT ライセンス。";+"What's inside" = "中身を見る";+"Three things, done well." = "3 つのことを、しっかりと。";+"Find caches, logs, broken installs, and the AI-app history hiding in your library." = "キャッシュ、ログ、壊れたインストール、ライブラリに潜む AI アプリの履歴を見つけます。";+"Drag an app, see every file it dropped, remove all of it. No leftovers." = "アプリをドラッグして、残したすべてのファイルを確認し、まとめて削除。残骸ゼロ。";+"Surfaces files that outlived the apps that created them." = "アプリを削除した後も残ったファイルを表示します。";+"One permission, then we're done" = "1 つの権限、それだけ";+"Permission granted" = "権限を付与しました";+"PureMac can now reach the locations macOS protects by default." = "PureMac は macOS が標準で保護している場所にアクセスできるようになりました。";+"macOS hides certain folders from every app until you say otherwise. We need them to find caches and uninstall cleanly." = "macOS は許可するまですべてのアプリから一部のフォルダを隠します。キャッシュの発見とクリーンなアンインストールに必要です。";+"All set — moving you to the next step." = "準備完了 - 次のステップへ進みます。";+"Reveal app again" = "アプリをもう一度表示";+"Reset permissions" = "権限をリセット";+"You're ready" = "準備完了";+"Ready when you are" = "いつでもどうぞ";+"Hit Start to run your first Smart Scan." = "「開始」を押して最初のスマートスキャンを実行。";+"Skip" = "スキップ";+"Start" = "開始";+"Continue" = "続ける";diff --git a/PureMac/pt-BR.lproj/Localizable.strings b/PureMac/pt-BR.lproj/Localizable.stringsindex 6f68e16..a5d02df 100644--- a/PureMac/pt-BR.lproj/Localizable.strings+++ b/PureMac/pt-BR.lproj/Localizable.strings@@ -301,3 +301,26 @@"1-tap setup. We'll auto-retry what failed." = "Configuração em 1 toque. Tentaremos de novo o que falhar.";"Fix permission" = "Corrigir permissão";"Dismiss" = "Dispensar";++/* Onboarding v2 */+"Reclaim your Mac" = "Recupere seu Mac";+"Apple sells you small disks. We help you keep them clean." = "A Apple vende discos pequenos. Nós ajudamos a mantê-los limpos.";+"Free. Open source. MIT licensed." = "Grátis. Código aberto. Licença MIT.";+"What's inside" = "O que tem dentro";+"Three things, done well." = "Três coisas, bem feitas.";+"Find caches, logs, broken installs, and the AI-app history hiding in your library." = "Encontre caches, logs, instalações quebradas e o histórico de apps de IA escondido na sua biblioteca.";+"Drag an app, see every file it dropped, remove all of it. No leftovers." = "Arraste um app, veja cada arquivo que ele deixou, remova tudo. Sem sobras.";+"Surfaces files that outlived the apps that created them." = "Mostra arquivos que sobreviveram aos apps que os criaram.";+"One permission, then we're done" = "Uma permissão e pronto";+"Permission granted" = "Permissão concedida";+"PureMac can now reach the locations macOS protects by default." = "Agora o PureMac pode acessar os locais que o macOS protege por padrão.";+"macOS hides certain folders from every app until you say otherwise. We need them to find caches and uninstall cleanly." = "O macOS esconde algumas pastas de todos os apps até você permitir. Precisamos delas para achar caches e desinstalar limpamente.";+"All set — moving you to the next step." = "Tudo certo - indo para o próximo passo.";+"Reveal app again" = "Mostrar app de novo";+"Reset permissions" = "Redefinir permissões";+"You're ready" = "Tudo pronto";+"Ready when you are" = "Prontos quando você estiver";+"Hit Start to run your first Smart Scan." = "Toque em Iniciar para rodar seu primeiro Smart Scan.";+"Skip" = "Pular";+"Start" = "Iniciar";+"Continue" = "Continuar";diff --git a/PureMac/zh-Hans.lproj/Localizable.strings b/PureMac/zh-Hans.lproj/Localizable.stringsindex 6e2644f..203b07b 100644--- a/PureMac/zh-Hans.lproj/Localizable.strings+++ b/PureMac/zh-Hans.lproj/Localizable.strings@@ -301,3 +301,26 @@"1-tap setup. We'll auto-retry what failed." = "一键设置。我们会自动重试失败的操作。";"Fix permission" = "修复权限";"Dismiss" = "忽略";++/* Onboarding v2 */+"Reclaim your Mac" = "夺回你的 Mac";+"Apple sells you small disks. We help you keep them clean." = "苹果卖给你小硬盘。我们帮你保持整洁。";+"Free. Open source. MIT licensed." = "免费。开源。MIT 许可。";+"What's inside" = "里面有什么";+"Three things, done well." = "三件事,做到极致。";+"Find caches, logs, broken installs, and the AI-app history hiding in your library." = "找出缓存、日志、损坏的安装文件,以及隐藏在资源库中的 AI 应用历史。";+"Drag an app, see every file it dropped, remove all of it. No leftovers." = "拖入一个 App,看到它留下的每个文件,全部清除。不留残余。";+"Surfaces files that outlived the apps that created them." = "显示比创建它们的应用更长寿的文件。";+"One permission, then we're done" = "一个权限,就够了";+"Permission granted" = "权限已授予";+"PureMac can now reach the locations macOS protects by default." = "PureMac 现在可以访问 macOS 默认保护的位置。";+"macOS hides certain folders from every app until you say otherwise. We need them to find caches and uninstall cleanly." = "在你允许之前,macOS 对所有 App 隐藏某些文件夹。我们需要它们来查找缓存并干净地卸载。";+"All set — moving you to the next step." = "全部就绪 - 进入下一步。";+"Reveal app again" = "再次显示 App";+"Reset permissions" = "重置权限";+"You're ready" = "准备就绪";+"Ready when you are" = "随时为你准备好";+"Hit Start to run your first Smart Scan." = "按开始运行你的第一次智能扫描。";+"Skip" = "跳过";+"Start" = "开始";+"Continue" = "继续";diff --git a/PureMac/zh-Hant.lproj/Localizable.strings b/PureMac/zh-Hant.lproj/Localizable.stringsindex 53c8b78..1229393 100644--- a/PureMac/zh-Hant.lproj/Localizable.strings+++ b/PureMac/zh-Hant.lproj/Localizable.strings@@ -301,3 +301,26 @@"1-tap setup. We'll auto-retry what failed." = "一鍵設定。我們會自動重試失敗的操作。";"Fix permission" = "修正權限";"Dismiss" = "略過";++/* Onboarding v2 */+"Reclaim your Mac" = "奪回你的 Mac";+"Apple sells you small disks. We help you keep them clean." = "蘋果賣給你小硬碟。我們幫你保持整潔。";+"Free. Open source. MIT licensed." = "免費。開放原始碼。MIT 授權。";+"What's inside" = "裡面有什麼";+"Three things, done well." = "三件事,做到極致。";+"Find caches, logs, broken installs, and the AI-app history hiding in your library." = "找出快取、日誌、損壞的安裝檔,以及隱藏在資料庫中的 AI App 紀錄。";+"Drag an app, see every file it dropped, remove all of it. No leftovers." = "拖入一個 App,看到它留下的每個檔案,全部清除。不留殘餘。";+"Surfaces files that outlived the apps that created them." = "顯示比建立它們的 App 更長壽的檔案。";+"One permission, then we're done" = "一個權限,就夠了";+"Permission granted" = "已授予權限";+"PureMac can now reach the locations macOS protects by default." = "PureMac 現在可以存取 macOS 預設保護的位置。";+"macOS hides certain folders from every app until you say otherwise. We need them to find caches and uninstall cleanly." = "在你允許之前,macOS 對所有 App 隱藏某些檔案夾。我們需要它們才能找到快取並乾淨地解除安裝。";+"All set — moving you to the next step." = "一切就緒 - 進入下一步。";+"Reveal app again" = "再次顯示 App";+"Reset permissions" = "重設權限";+"You're ready" = "已準備就緒";+"Ready when you are" = "隨時為你準備好";+"Hit Start to run your first Smart Scan." = "按開始執行你的第一次智慧掃描。";+"Skip" = "略過";+"Start" = "開始";+"Continue" = "繼續";diff --git a/README.md b/README.mdindex e1c32a8..add1764 100644--- a/README.md+++ b/README.md@@ -14,14 +14,12 @@<h1 align="center">PureMac</h1><p align="center">- <b>Free, open-source macOS app manager and system cleaner.</b><br>- Uninstall apps completely. Find orphaned files. Clean system junk.<br>- No subscriptions. No telemetry. No data collection.+ <b>Reclaim your Mac.</b><br>+ Free, open-source uninstaller and cleaner for macOS. No subscription, no telemetry, no upsell.</p><p align="center"><a href="https://github.com/momenbasel/PureMac/releases/latest"><img src="https://img.shields.io/github/v/release/momenbasel/PureMac?style=flat-square&label=Download" alt="Latest Release"></a>- <a href="https://github.com/momenbasel/PureMac/actions/workflows/build.yml"><img src="https://img.shields.io/github/actions/workflow/status/momenbasel/PureMac/build.yml?style=flat-square&label=Build" alt="Build Status"></a><img src="https://img.shields.io/badge/macOS-13.0+-blue?style=flat-square" alt="macOS 13.0+"><img src="https://img.shields.io/badge/Swift-5.9-orange?style=flat-square" alt="Swift 5.9"><a href="LICENSE"><img src="https://img.shields.io/github/license/momenbasel/PureMac?style=flat-square" alt="MIT License"></a>@@ -31,7 +29,9 @@<p align="center"><a href="#install">Install</a> -- <a href="#features">Features</a> -+ <a href="#why-this-exists">Why this exists</a> -+ <a href="#what-it-does">What it does</a> -+ <a href="#permissions">Permissions</a> -<a href="#screenshots">Screenshots</a> -<a href="#contributing">Contributing</a></p>@@ -40,18 +40,11 @@## Install-### Homebrew (recommended)-```bash-brew updatebrew install --cask puremac```-### Direct Download--Download the latest `.dmg` from [Releases](https://github.com/momenbasel/PureMac/releases/latest), open it, and drag PureMac to `/Applications`.--> Signed and notarized with Apple Developer ID - installs without Gatekeeper warnings.+Or download the signed, notarized `.dmg` from [Releases](https://github.com/momenbasel/PureMac/releases/latest) and drag PureMac into `/Applications`. No Gatekeeper warnings, no quarantine workaround.### Build from source@@ -60,52 +53,61 @@ brew install xcodegengit clone https://github.com/momenbasel/PureMac.gitcd PureMacxcodegen generate-xcodebuild -project PureMac.xcodeproj -scheme PureMac -configuration Release -derivedDataPath build build+xcodebuild -project PureMac.xcodeproj -scheme PureMac -configuration Release \+ -derivedDataPath build buildopen build/Build/Products/Release/PureMac.app```-## Features+## Why this exists++Apple sells base-model Macs with 256 GB SSDs that you can't upgrade. The Mac mini, the Air, every entry-level MacBook Pro - the drive is soldered down. The next storage tier costs more than a midrange Windows laptop. Once you've paid it, every gigabyte you've already bought matters.++Most Mac cleaners are subscription apps that hide their disk usage behind a paywall, ship telemetry by default, and trade on FUD ("47 GB of junk detected!"). PureMac is the opposite:++- **One-time install.** No subscription, no trial, no account.+- **No telemetry.** It never phones home. It doesn't even know you exist.+- **Open source under MIT.** Read the code, fork it, audit it.+- **Honest scans.** "Junk" means actually-junk: cache directories the OS itself would purge, orphaned files left by apps you've already deleted, broken installer receipts, that 4 GB Xcode DerivedData blob from 2023.+- **Real uninstalls.** Drag an app, see every preference plist, cache folder, container, launch agent and log file it dropped across your library, remove all of it at once.++The goal is to leave behind software that respects the people running it long after the people who wrote it have moved on.++## What it does### App Uninstaller-- Discovers all installed apps from `/Applications` and `~/Applications`-- Heuristic file discovery engine with **10-level matching** (bundle ID, company name, entitlements, team identifier, Spotlight metadata, container discovery)-- **3 sensitivity levels**: Strict (safe), Enhanced (balanced), Deep (thorough)-- Shows all related files: caches, preferences, containers, logs, support files, launch agents-- System app protection - 27 Apple apps are excluded from the uninstall list-- Master-detail view: app table on left, discovered files on right--### Orphaned File Finder-- Detects leftover files in `~/Library` from apps that have been uninstalled-- Compares Library contents against all installed app identifiers-- One-click cleanup of orphaned files+Discovers everything in `/Applications` and `~/Applications`, then uses a 10-level matching engine (bundle ID, team identifier, entitlements, Spotlight metadata, container discovery, company-name heuristics, partial path matches) to find every file the app dropped on your disk. Three sensitivity tiers - Strict, Enhanced, Deep - let you choose how aggressive that match is. Apple system apps are excluded from the uninstall list automatically.++### Orphan Finder+Walks `~/Library` and surfaces files left behind by apps that no longer exist on disk. The matcher compares against bundle identifiers and normalized names of every installed app, so a leftover `~/Library/Containers/com.foo.bar` from an app you deleted in 2022 shows up clearly.### System Cleaner-- **Smart Scan** - one-click scan across all categories-- **System Junk** - system caches, logs, and temporary files-- **User Cache** - dynamically discovers all app caches (no hardcoded app list)-- **AI Apps** - Ollama and LM Studio logs, caches, and opt-in local history cleanup-- **Mail Attachments** - downloaded mail attachments-- **Trash Bins** - empty all Trash-- **Large & Old Files** - files over 100 MB or older than 1 year-- **Purgeable Space** - APFS purgeable disk space detection+Smart Scan runs every category in parallel. Each category is its own deliberate scanner:++- **System Junk** - system caches, logs, temp files+- **User Cache** - dynamically discovered, no hardcoded app list+- **AI Apps** - Ollama and LM Studio logs, caches, opt-in history cleanup+- **Mail Files** - downloaded mail attachments+- **Trash Bins** - empties all bins, including external volumes+- **Large & Old Files** - >100 MB or older than 1 year (never auto-selected)+- **Purgeable Space** - reclaims APFS purgeable space via `diskutil`- **Xcode Junk** - DerivedData, Archives, simulator caches-- **Brew Cache** - Homebrew download cache (detects custom HOMEBREW_CACHE)-- **Scheduled Cleaning** - automatic scans on configurable intervals--### Native macOS Experience-- Built with SwiftUI using native macOS components-- `NavigationSplitView`, `Toggle`, `ProgressView`, `Form`, `GroupBox`, `Table`-- Respects system light/dark mode automatically-- No custom gradients, glows, or web-app styling-- First-launch onboarding with Full Disk Access setup--### Safety-- Confirmation dialogs before all destructive operations-- Symlink attack prevention - resolves and validates paths before deletion-- System app protection - Apple apps cannot be uninstalled-- Large & Old Files are never auto-selected-- AI prompt and conversation history is visible for review but never selected automatically-- Structured logging via `os.log` (visible in Console.app)+- **Brew Cache** - respects custom `HOMEBREW_CACHE`+- **Node Cache** - npm, yarn classic, pnpm content-addressable store+- **Docker Cache** - images, containers, build cache++### Scheduled Cleaning+Optional. Configurable interval (hourly to monthly), with auto-clean threshold so background runs only fire when there's something meaningful to remove.++## Permissions++PureMac needs **Full Disk Access** to read the locations macOS hides from every app by default - Mail downloads, Safari data, the TCC database, protected app containers. Without it, the cleanup categories miss roughly 70% of what they could find and app uninstalls leave behind everything in `~/Library/Containers`.++The first-launch onboarding walks you through granting it with an animated preview of the exact toggle you need to flip. If you skip it, the dashboard surfaces a single-click "Set up" pill. If a cleanup fails because of a permission issue, PureMac opens System Settings, reveals its bundle in Finder so you can drag it into the FDA list, polls the permission state every second, and auto-retries the failed batch the moment you grant access. You never have to re-select anything.++What PureMac does *not* do:+- It does not collect telemetry, crash reports, or usage analytics.+- It does not require a network connection to operate.+- It does not move data anywhere except the Trash and `diskutil`'s APFS purge command.## Screenshots@@ -128,45 +130,54 @@ PureMac/Logic/Scanning/ - Heuristic scan engine, locations database, conditionsLogic/Utilities/ - Structured loggingModels/ - Data models, typed errors- Services/ - Scan engine, cleaning engine, scheduler+ Services/ - Scan engine, cleaning engine, permission coordinator, schedulerViewModels/ - Centralized app stateViews/ - Native SwiftUI viewsApps/ - App uninstaller views- Cleaning/ - Smart scan and category views+ Components/ - Shared components (FDA demo, permission sheet, theme)Orphans/ - Orphan finderSettings/ - Native Form-based settings- Components/ - Shared components```Key components:- **AppPathFinder** - 10-level heuristic matching engine for discovering app-related files- **Locations** - 120+ macOS filesystem search paths- **Conditions** - 25 per-app matching rules for edge cases (Xcode, Chrome, VS Code, etc.)-- **AppInfoFetcher** - Spotlight metadata + Info.plist fallback for app discovery-- **Logger** - Apple `os.log` unified logging+- **PermissionCoordinator** - Single source of truth for FDA prompts, polling, and post-grant retries+- **FullDiskAccessManager** - TCC probe + registration; broad probe paths (Mail, Safari, Messages, AddressBook, Calendars) so macOS catalogs the bundle reliably+- **CleaningEngine** - Symlink-resistant deletion with an allow-list, NSAppleScript-based admin escalation for root-owned items, NUL-separated path staging for xargs++## Security++- Symlink attack prevention: paths are resolved before validation, re-resolved immediately before unlink to close TOCTOU windows.+- Allow-list cleaning: a path that doesn't sit inside an explicit safe-root is refused, even for the user-level pass.+- Admin escalation is gated by a *narrower* allow-list (app bundles, package receipts, launch plists) than the normal cleaner — root-owned items can only be removed inside those roots.+- System app protection: Apple's bundles cannot be uninstalled, regardless of selection.+- All destructive operations require explicit confirmation by default. The toggle that disables that confirmation is buried in Settings.++If you find a vulnerability, please open a private security advisory rather than a public issue.## Contributing-Contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.+Pull requests welcome. See [CONTRIBUTING.md](CONTRIBUTING.md).-Areas where help is especially welcome:-- Size/date filter presets in category views-- XCTest coverage for AppState and scan engine-- Localization (zh-Hans, zh-Hant, and other languages)+Especially welcome:+- Per-category size and date filter presets+- Wider XCTest coverage for `AppState` and the scan engine+- Translations beyond the current set (en, ar, es, ja, pt-BR, zh-Hans, zh-Hant)- App icon design## Acknowledgments-v2.0 was shaped by community feedback and contributions:--- **[@nguyenhuy158](https://github.com/nguyenhuy158)** - Search and filter feature request ([#18](https://github.com/momenbasel/PureMac/issues/18)) and implementation ([#29](https://github.com/momenbasel/PureMac/pull/29))+- **[@nguyenhuy158](https://github.com/nguyenhuy158)** - Search and filter feature ([#18](https://github.com/momenbasel/PureMac/issues/18), [#29](https://github.com/momenbasel/PureMac/pull/29))- **[@edufalcao](https://github.com/edufalcao)** - Cleaning safety guards and confirmation dialogs ([#30](https://github.com/momenbasel/PureMac/pull/30))-- **[@zeck00](https://github.com/zeck00)** - UI overhaul ([#31](https://github.com/momenbasel/PureMac/pull/31)), app uninstaller with system app protection ([#32](https://github.com/momenbasel/PureMac/pull/32)), and onboarding experience ([#33](https://github.com/momenbasel/PureMac/pull/33))+- **[@zeck00](https://github.com/zeck00)** - UI overhaul ([#31](https://github.com/momenbasel/PureMac/pull/31)), app uninstaller with system app protection ([#32](https://github.com/momenbasel/PureMac/pull/32)), onboarding experience ([#33](https://github.com/momenbasel/PureMac/pull/33))- **[@0x-man](https://github.com/0x-man)** - Symlink security vulnerability report ([#25](https://github.com/momenbasel/PureMac/issues/25))- **[@ansidev](https://github.com/ansidev)** - Checkbox interaction bug report ([#34](https://github.com/momenbasel/PureMac/issues/34))- **[@fengcheng01](https://github.com/fengcheng01)** - App uninstaller feature request ([#28](https://github.com/momenbasel/PureMac/issues/28))- **[@scholzfuni](https://github.com/scholzfuni)** - Modularization proposal ([#23](https://github.com/momenbasel/PureMac/issues/23))+- **[@Zonharo](https://github.com/Zonharo)** - In-app auto-update request ([#94](https://github.com/momenbasel/PureMac/issues/94))## License-MIT License. See [LICENSE](LICENSE) for details.+MIT. See [LICENSE](LICENSE). Use it, fork it, ship it under your own name if you want - the only thing the license asks is that the notice stays.diff --git a/project.yml b/project.ymlindex f7db3be..f829860 100644--- a/project.yml+++ b/project.yml@@ -23,8 +23,8 @@ settings:CODE_SIGN_ENTITLEMENTS: "PureMac/PureMac.entitlements"INFOPLIST_FILE: "PureMac/Info.plist"PRODUCT_BUNDLE_IDENTIFIER: "com.puremac.app"- MARKETING_VERSION: "2.4.0"- CURRENT_PROJECT_VERSION: "8"+ MARKETING_VERSION: "2.5.0"+ CURRENT_PROJECT_VERSION: "9"GENERATE_INFOPLIST_FILE: "NO"ASSETCATALOG_COMPILER_APPICON_NAME: "AppIcon"COMBINE_HIDPI_IMAGES: "YES"