MyMacCleaner - Open-source macOS system utility with Apple's Liquid Glass UI design.
| Attribute | Value |
|---|---|
| Language | Swift 5.9+ |
| UI Framework | SwiftUI |
| Target | macOS 14.0+ (Sonoma) |
| Design | Liquid Glass (native on macOS 26+, material fallback on 14-15) |
| Architecture | MVVM with Swift actors for services |
| Status | Beta (v0.1.x) |
| Feature | Description |
|---|---|
| Home | Smart Scan dashboard with system stats, permission prompts |
| Disk Cleaner | Category-based cleanup (caches, logs, Xcode, browser data, trash) |
| Space Lens | Treemap visualization of disk usage with squarified algorithm |
| Orphaned Files | Detect leftover files from uninstalled apps |
| Duplicates | Find duplicate files by hash with cancellation support |
| Performance | RAM monitoring, process list (htop-like), 8 maintenance tasks |
| Applications | App manager with Sparkle update checking, Homebrew cask integration |
| Port Management | Network connections via lsof, process killing |
| System Health | Health score gauge, disk/battery/system info |
| Startup Items | Login item management via BTM |
| Permissions | FDA and folder access management with TCC dialog triggers |
| Menu Bar | Real-time CPU/RAM/Disk stats with 4 display modes |
| Localization | EN/IT/ES with runtime switching |
MyMacCleaner/
├── App/ # MyMacCleanerApp.swift, ContentView.swift
├── Core/
│ ├── Design/ # Theme, LiquidGlass, Animations, ToastView
│ ├── Services/ # FileScanner, PermissionsService, AuthorizationService,
│ │ # AppUpdateChecker, HomebrewService, LocalizationManager,
│ │ # BrowserCleanerService, OrphanedFilesScanner,
│ │ # DuplicateScanner, SystemStatsProvider
│ ├── Models/ # ScanResult, PermissionCategory
│ └── Extensions/
├── Features/
│ ├── Home/ # HomeView, HomeViewModel, ScanResultsCard, PermissionPromptView
│ ├── DiskCleaner/ # DiskCleanerView, BrowserPrivacyView, CleanupCategoryCard
│ ├── SpaceLens/ # SpaceLensView, TreemapLayout
│ ├── OrphanedFiles/ # OrphanedFilesView
│ ├── Duplicates/ # DuplicatesView
│ ├── Performance/ # PerformanceView (Memory, Processes, Maintenance tabs)
│ ├── Applications/ # ApplicationsView (All Apps, Updates, Homebrew tabs)
│ ├── PortManagement/ # PortManagementView
│ ├── SystemHealth/ # SystemHealthView
│ ├── StartupItems/ # StartupItemsView
│ └── Permissions/ # PermissionsView
├── MenuBar/ # MenuBarController, MenuBarView
└── Resources/ # Assets.xcassets, Localizable.xcstrings
- Memory calculation: Active + Wired + Compressed (matches htop)
- Admin commands: Single AppleScript password prompt for batch operations
- File iteration:
while let obj = enumerator.nextObject()pattern for async safety - Homebrew detection: Checks both
/opt/homebrew/bin/brew(ARM) and/usr/local/bin/brew(Intel) - Permissions: TCC folders trigger dialog via
FileManager.contentsOfDirectory(), FDA requires System Settings - Liquid Glass:
#available(macOS 26, *)checks with.ultraThinMaterialfallback
xcodebuild -project MyMacCleaner.xcodeproj -scheme MyMacCleaner build
xcodebuild test -project MyMacCleaner.xcodeproj -scheme MyMacCleanerThe release script automates the complete release workflow:
./scripts/release.sh <version> "<changelog>"
# Example: ./scripts/release.sh 0.1.1 "Fixed bug in file scanner"- Updates version in Xcode project (version string + build number)
- Builds and archives the app
- Signs with Developer ID certificate
- Notarizes with Apple (app + DMG)
- Creates DMG and ZIP packages
- Signs ZIP for Sparkle auto-updates
- Updates
appcast.xmlandwebsite/public/data/releases.json - Creates GitHub release with assets
- Commits and pushes all changes
- Copy
.env.exampleto.envand fill in credentials - Set up notarization profile:
xcrun notarytool store-credentials "notary-profile" --apple-id YOUR_APPLE_ID --team-id YOUR_TEAM_ID - Authenticate gh CLI:
gh auth login - Find certificate SHA-1:
security find-identity -v -p codesigning
| Variable | Description |
|---|---|
APPLE_ID |
Apple Developer email |
APPLE_APP_SPECIFIC_PASSWORD |
App-specific password for notarization |
APPLE_TEAM_ID |
10-character Team ID |
MACOS_CERTIFICATE_SHA1 |
40-character SHA-1 hash of signing certificate |
SPARKLE_PRIVATE_KEY |
Base64 EdDSA private key for Sparkle updates |
| Package | Purpose |
|---|---|
| Sparkle 2.x | Auto-updates (conditional import) |
- Use async/await and actors for thread safety
- Keep views simple, logic in ViewModels
- Use
enumerator(at:includingPropertiesForKeys:)for file scanning - Cancel operations when user navigates away
- Never store passwords; request permissions at point of use
- Update
docs/*.mdwhen features change