Skip to content

Add CoreSimulator cache removal support#17

Open
davidnichols-ops wants to merge 1 commit into
IrelDev:masterfrom
davidnichols-ops:feature/core-simulator-cache-removal
Open

Add CoreSimulator cache removal support#17
davidnichols-ops wants to merge 1 commit into
IrelDev:masterfrom
davidnichols-ops:feature/core-simulator-cache-removal

Conversation

@davidnichols-ops

Copy link
Copy Markdown

What

Adds support for scanning and cleaning the CoreSimulator caches directory at ~/Library/Developer/CoreSimulator/Caches/, which can grow significantly with simulator dyld caches and other temporary data.

Closes #16.

Changes

  • DirectoryType.swift: Add coreSimulatorCache case to the enum
  • DirectoryManager.swift: Add getCoreSimulatorCachePath() method and wire it into getPath(for:)
  • ViewModel.swift: Add coreSimulatorCache property, scan it in startScan(), include it in getViewModelForItemList, cleanBeforeScan, startClean, and getViewModelForPieChart
  • PieChartViewModel.swift / PieChartViewModelProtocol.swift: Add coreSimulatorCache parameter to createItems with a blue pie chart slice
  • ViewModelProtocol.swift: Add coreSimulatorCache property to the protocol

The DirectoryListView already iterates over DirectoryType.allCases, so the new category appears in the UI automatically.

The CoreSimulator caches directory at
~/Library/Developer/CoreSimulator/Caches/ can grow significantly over
time with simulator dyld caches and other temporary data. Add it as a
new DirectoryType so it appears in the scan results, pie chart, and
cleaning flow alongside the existing Xcode cache categories.

Closes IrelDev#16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add core simulator cache removal

1 participant