Skip to content

Building from Source

AlexTkDev edited this page Oct 1, 2026 · 3 revisions

Requirements

  • Xcode 26+
  • macOS 26.0+
  • XcodeGen

Steps

git clone https://github.com/AlexTkDev/MacOSCleaner.git
cd MacOSCleaner
xcodegen generate
open MacOSCleaner.xcodeproj

Run the MacOSCleaner scheme. The app requires Full Disk Access to scan system paths.

Project Generation

The Xcode project is generated from project.yml (XcodeGen). Do not edit the .xcodeproj directly — edit project.yml and regenerate.

Catalog Validation

A pre-build script (scripts/generate_cleanup_paths.swift) validates and packs the private catalog. Maintainer builds require all three source files together in MacOSCleaner/Resources/:

  • engine_paths.json
  • ui_metadata.json
  • catalog_policy.json

The script packs them into a binary catalog asset and verifies the asset matches the sources (--write, then --check). Public builds without these files fall back to the compiled catalog embedded in the app.

Regenerate the project after changing project.yml; the build script runs automatically as part of the scheme.

Tests

The repository includes a unit test target (MacOSCleanerTests) covering cleanup, safety, process policy, trash, localization completeness, and more. Run tests with ⌘U in Xcode.

Code Signing

The app is signed with a development certificate for local builds; production builds use a Developer ID certificate and notarization. Adjust the signing configuration in project.yml for your own distribution.

Clone this wiki locally