<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aurelian Ro</title>
    <description>The latest articles on DEV Community by Aurelian Ro (@aurelian_ro_2bbb4d400dd58).</description>
    <link>https://dev.to/aurelian_ro_2bbb4d400dd58</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4271259%2F64b6b5cd-d839-47a8-9fb5-70a82a3e083e.jpg</url>
      <title>DEV Community: Aurelian Ro</title>
      <link>https://dev.to/aurelian_ro_2bbb4d400dd58</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aurelian_ro_2bbb4d400dd58"/>
    <language>en</language>
    <item>
      <title>Where 150 GB of 'System Data' Actually Hides on macOS (And Building a 3 MB SwiftUI Cleaner)</title>
      <dc:creator>Aurelian Ro</dc:creator>
      <pubDate>Sun, 29 Nov 2026 12:11:39 +0000</pubDate>
      <link>https://dev.to/aurelian_ro_2bbb4d400dd58/where-150-gb-of-system-data-actually-hides-on-macos-and-building-a-3-mb-swiftui-cleaner-1eo</link>
      <guid>https://dev.to/aurelian_ro_2bbb4d400dd58/where-150-gb-of-system-data-actually-hides-on-macos-and-building-a-3-mb-swiftui-cleaner-1eo</guid>
      <description>&lt;p&gt;If you have ever opened &lt;strong&gt;System Settings → General → Storage&lt;/strong&gt; on macOS and stared at a mysterious gray &lt;strong&gt;"System Data"&lt;/strong&gt; bar eating 120–200 GB of your SSD, you know how frustrating Apple's storage summary can be.&lt;/p&gt;

&lt;p&gt;While building &lt;strong&gt;&lt;a href="https://toolsforabetterworld.com/tidymac/" rel="noopener noreferrer"&gt;TidyMac&lt;/a&gt;&lt;/strong&gt; — a ~3 MB native SwiftUI disk cleaner, app uninstaller, and Homebrew updater — I spent weeks mapping where macOS actually hides reclaimable gigabytes (and which paths you must &lt;em&gt;never&lt;/em&gt; touch).&lt;/p&gt;

&lt;p&gt;Here is a practical breakdown of the biggest culprits you can check right now, plus two macOS engineering gotchas I learned shipping a direct-download notarized &lt;code&gt;.dmg&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. The Top 4 "System Data" Space Hogs on Developer Macs
&lt;/h2&gt;

&lt;h3&gt;
  
  
  A. Xcode &lt;code&gt;DerivedData&lt;/code&gt;, DeviceSupport &amp;amp; CoreSimulator (20–120 GB)
&lt;/h3&gt;

&lt;p&gt;Even if you only opened Xcode a handful of times, build intermediates and old iOS simulator runtimes quietly pile up under &lt;code&gt;~/Library/Developer&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;du -sh ~/Library/Developer/Xcode/DerivedData \
       ~/Library/Developer/Xcode/iOS\ DeviceSupport \
       ~/Library/Developer/CoreSimulator/Devices 2&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;DerivedData&lt;/code&gt; is 100% safe to clear (Xcode regenerates it on your next build).&lt;/li&gt;
&lt;li&gt;Unused simulator runtimes can be pruned cleanly with &lt;code&gt;xcrun simctl delete unavailable&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  B. Orphaned &lt;code&gt;~/Library&lt;/code&gt; Leftovers from Drag-to-Trash Apps (5–40 GB)
&lt;/h3&gt;

&lt;p&gt;Dragging an &lt;code&gt;.app&lt;/code&gt; bundle from &lt;code&gt;/Applications&lt;/code&gt; to the Trash leaves behind its sandbox containers, caches, and support databases across at least five folders:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;~/Library/Application Support/&amp;lt;AppName or BundleID&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~/Library/Caches/&amp;lt;BundleID&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~/Library/Containers/&amp;lt;BundleID&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~/Library/Saved Application State/&amp;lt;BundleID&amp;gt;.savedState&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~/Library/LaunchAgents/&amp;lt;BundleID&amp;gt;*.plist&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Electron apps, video editors, and local AI tools routinely leave 2–15 GB behind in &lt;code&gt;Application Support&lt;/code&gt; long after the &lt;code&gt;.app&lt;/code&gt; itself is gone.&lt;/p&gt;

&lt;h3&gt;
  
  
  C. Local APFS Time Machine Snapshots
&lt;/h3&gt;

&lt;p&gt;macOS keeps hourly local APFS snapshots even when your backup drive isn't plugged in, and Finder often folds them into System Data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tmutil listlocalsnapshots /
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  D. &lt;code&gt;com.apple.iconservices&lt;/code&gt; Gotcha (What &lt;em&gt;Not&lt;/em&gt; to Delete!)
&lt;/h3&gt;

&lt;p&gt;One painful lesson from building a cleaner: aggressively wiping &lt;code&gt;com.apple.iconservices.store&lt;/code&gt; or active app container metadata while apps are running causes macOS Dock and Menu Bar icons to turn blank until launch services rebuilds. In &lt;strong&gt;TidyMac &lt;code&gt;v0.81&lt;/code&gt;&lt;/strong&gt;, we maintain an explicit &lt;code&gt;SafetyDatabase&lt;/code&gt; allowlist/denylist and route cleanups through a &lt;strong&gt;24-hour undo staging area&lt;/strong&gt; so nothing irreversible happens by accident.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Notarizing a Direct-Distribution SwiftUI App Outside the Mac App Store
&lt;/h2&gt;

&lt;p&gt;Because a real system cleaner and Homebrew cask updater cannot run inside Apple's strict App Store sandbox (&lt;code&gt;com.apple.security.app-sandbox = false&lt;/code&gt;), we distribute TidyMac as a signed, Apple-notarized Universal (&lt;code&gt;arm64&lt;/code&gt; + &lt;code&gt;x86_64&lt;/code&gt;) &lt;code&gt;.dmg&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;One non-obvious &lt;code&gt;xcodebuild&lt;/code&gt; gotcha that trips up many solo Mac devs: when building a Release binary with &lt;code&gt;xcodebuild ... build&lt;/code&gt; using a &lt;code&gt;Developer ID Application&lt;/code&gt; certificate, Xcode silently injects &lt;code&gt;com.apple.security.get-task-allow = true&lt;/code&gt; unless you explicitly disable base entitlement injection:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;xcodebuild -project TidyMac.xcodeproj \
  -scheme TidyMac -configuration Release \
  &lt;span class="nv"&gt;ARCHS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"arm64 x86_64"&lt;/span&gt; &lt;span class="nv"&gt;ONLY_ACTIVE_ARCH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;NO \
  &lt;span class="nv"&gt;CODE_SIGN_INJECT_BASE_ENTITLEMENTS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;NO \
  &lt;span class="nv"&gt;OTHER_CODE_SIGN_FLAGS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"--timestamp --options=runtime"&lt;/span&gt; build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without &lt;code&gt;CODE_SIGN_INJECT_BASE_ENTITLEMENTS=NO&lt;/code&gt;, Apple's &lt;code&gt;notarytool&lt;/code&gt; rejects the submission with &lt;code&gt;The executable requests the com.apple.security.get-task-allow entitlement&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try TidyMac (or Install via Homebrew)
&lt;/h2&gt;

&lt;p&gt;If you want a fast, visual native SwiftUI tool (~3 MB DMG, zero Electron, 100% local scanning) that maps disk usage, catches orphaned app leftovers, guards RAM pressure, and updates outdated Homebrew casks in one click:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew install --cask aurelian83/tap/tidymac
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or grab the notarized &lt;code&gt;.dmg&lt;/code&gt; directly at &lt;strong&gt;&lt;a href="https://toolsforabetterworld.com/tidymac/" rel="noopener noreferrer"&gt;toolsforabetterworld.com/tidymac&lt;/a&gt;&lt;/strong&gt; (7-day full Pro trial with no card needed, core tools available through day 30, plus we're running a &lt;strong&gt;10 × 1-Year Pro Community Draw&lt;/strong&gt; right inside the app for early testers).&lt;/p&gt;

&lt;p&gt;Happy to answer any questions about macOS storage internals, &lt;code&gt;SafetyDatabase&lt;/code&gt; rules, or SwiftUI notarization!&lt;/p&gt;

</description>
      <category>macos</category>
      <category>swift</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Building a Zero-Dependency, Apple-Notarized Auto-Updater in Native Swift (Without Sparkle)</title>
      <dc:creator>Aurelian Ro</dc:creator>
      <pubDate>Sat, 28 Nov 2026 19:19:33 +0000</pubDate>
      <link>https://dev.to/aurelian_ro_2bbb4d400dd58/building-a-zero-dependency-apple-notarized-auto-updater-in-native-swift-without-sparkle-46kk</link>
      <guid>https://dev.to/aurelian_ro_2bbb4d400dd58/building-a-zero-dependency-apple-notarized-auto-updater-in-native-swift-without-sparkle-46kk</guid>
      <description>&lt;p&gt;When you ship a native macOS app outside the Mac App Store, distribution gets tricky fast. Users expect two things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Zero Gatekeeper warnings&lt;/strong&gt; (proper Developer ID signing + Apple Notarization + stapled &lt;code&gt;.dmg&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One-click automatic updates&lt;/strong&gt; that never force them back to a browser to manually drag another &lt;code&gt;.dmg&lt;/code&gt; into &lt;code&gt;/Applications&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Most indie devs reach for Sparkle 2, which is battle-tested — but for our lightweight native SwiftUI utility (&lt;strong&gt;&lt;a href="https://toolsforabetterworld.com/tidymac/" rel="noopener noreferrer"&gt;TidyMac&lt;/a&gt;&lt;/strong&gt;), embedding an external framework more than doubled our app's footprint and complicated our dual-target XcodeGen setup (Direct DMG vs. sandboxed Mac App Store).&lt;/p&gt;

&lt;p&gt;Here is the exact, zero-dependency architecture we shipped in &lt;strong&gt;TidyMac v0.81&lt;/strong&gt; using only Apple's built-in frameworks (&lt;code&gt;CryptoKit&lt;/code&gt;, &lt;code&gt;Foundation&lt;/code&gt;, &lt;code&gt;codesign&lt;/code&gt;, and &lt;code&gt;spctl&lt;/code&gt;).&lt;/p&gt;




&lt;h2&gt;
  
  
  1. The Notarization Gotcha That Trips Up &lt;code&gt;xcodebuild&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;If you build your Release &lt;code&gt;.app&lt;/code&gt; with &lt;code&gt;xcodebuild ... build&lt;/code&gt; instead of &lt;code&gt;archive&lt;/code&gt;, Xcode silently injects &lt;code&gt;com.apple.security.get-task-allow = true&lt;/code&gt; even when signing with a &lt;code&gt;Developer ID Application&lt;/code&gt; certificate. Apple's Notary Service rejects that immediately.&lt;/p&gt;

&lt;p&gt;The one-line fix in &lt;code&gt;project.yml&lt;/code&gt; (or your &lt;code&gt;.xcconfig&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;DEVELOPMENT_TEAM&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"YOUR_TEAM_ID"&lt;/span&gt;
&lt;span class="na"&gt;CODE_SIGN_IDENTITY&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Developer ID Application"&lt;/span&gt;
&lt;span class="na"&gt;CODE_SIGN_STYLE&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Manual&lt;/span&gt;
&lt;span class="na"&gt;CODE_SIGN_INJECT_BASE_ENTITLEMENTS&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"NO"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Always verify with &lt;code&gt;codesign -d --entitlements - TidyMac.app&lt;/code&gt; before running &lt;code&gt;xcrun notarytool submit ... --wait&lt;/code&gt; and &lt;code&gt;xcrun stapler staple&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. A Tiny Static JSON Manifest (&lt;code&gt;latest.json&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;Instead of generating XML appcasts and managing separate EdDSA keys, we host a tiny static JSON file at &lt;code&gt;https://toolsforabetterworld.com/tidymac/latest.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"0.81"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://toolsforabetterworld.com/tidymac/downloads/TidyMac-0.81.dmg"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"sha256"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"c10bde6aac7a0bdb6a68db8affa7dd2cc60961ce9122f6cea9cc5062fc146739"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"notes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="s2"&gt;"Built-in automatic update checker with 1-click Install &amp;amp; Relaunch"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"Cryptographic SHA-256 + Apple Notarized Developer ID verification"&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  3. Defense-in-Depth Verification Before Replacing &lt;code&gt;/Applications/TidyMac.app&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Never trust a URL or even a single hash alone. Before our updater touches the installed &lt;code&gt;.app&lt;/code&gt;, it enforces &lt;strong&gt;three independent checks&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;SHA-256 integrity check&lt;/strong&gt; on the downloaded &lt;code&gt;.dmg&lt;/code&gt; using &lt;code&gt;CryptoKit.SHA256&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strict code-signature + Team ID check&lt;/strong&gt; on the privately mounted &lt;code&gt;.app&lt;/code&gt;:

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;codesign --verify --deep --strict &amp;lt;mounted&amp;gt;/TidyMac.app&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;codesign -dv &amp;lt;mounted&amp;gt;/TidyMac.app&lt;/code&gt; must explicitly contain our &lt;code&gt;TeamIdentifier&lt;/code&gt; and &lt;code&gt;Identifier=com.tidymac.app&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Apple Gatekeeper / Notarization assessment&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;spctl -a -t exec -vv &amp;lt;mounted&amp;gt;/TidyMac.app&lt;/code&gt; must exit &lt;code&gt;0&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That means even if a CDN or web host were ever compromised, macOS will refuse to swap in any binary not signed by our Apple Developer ID and notarized by Apple.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Clean Atomic Swap &amp;amp; Relaunch
&lt;/h2&gt;

&lt;p&gt;Once verified, we spawn a tiny detached &lt;code&gt;/bin/sh&lt;/code&gt; helper (&lt;code&gt;0700&lt;/code&gt; in temp dir), wait for the current &lt;code&gt;PID&lt;/code&gt; to exit, copy with &lt;code&gt;ditto&lt;/code&gt; to &lt;code&gt;TidyMac.app.new&lt;/code&gt;, atomically rename over &lt;code&gt;TidyMac.app&lt;/code&gt;, detach the hidden DMG mount, and call &lt;code&gt;open /Applications/TidyMac.app&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Total binary overhead added to our &lt;code&gt;.dmg&lt;/code&gt;: &lt;strong&gt;&amp;lt; 15 KB&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try It Out (and Enter Our Community Draw)
&lt;/h2&gt;

&lt;p&gt;We just shipped this in &lt;strong&gt;TidyMac v0.81&lt;/strong&gt; (a native SwiftUI, privacy-first macOS cleaner, interactive Disk Visualizer, App Uninstaller, and RAM Guard):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Website &amp;amp; Free Download:&lt;/strong&gt; &lt;a href="https://toolsforabetterworld.com/tidymac/" rel="noopener noreferrer"&gt;https://toolsforabetterworld.com/tidymac/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Public Roadmap (System Data X-Ray, Open Ports Inspector, Local MCP Server):&lt;/strong&gt; &lt;a href="https://toolsforabetterworld.com/tidymac/roadmap.html" rel="noopener noreferrer"&gt;https://toolsforabetterworld.com/tidymac/roadmap.html&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We're also running a transparent &lt;strong&gt;10× 1-Year Pro License Community Draw&lt;/strong&gt; directly inside the app (drawn once we reach 50 verified testers — 20% odds!). Happy to answer any questions about macOS notarization, SwiftUI &lt;code&gt;MenuBarExtra&lt;/code&gt;, or dual Direct/MAS targets in the comments.&lt;/p&gt;

</description>
      <category>macos</category>
      <category>swift</category>
      <category>swiftui</category>
      <category>indiedev</category>
    </item>
  </channel>
</rss>
