CodePurgeDeveloperDataKit is a module within the CodePurge project. This package introduces specialized components and tools for managing developer-related data such as archives, derived data, documentation caches, and device support files. It provides essential utilities and views for efficiently scanning, selecting, and purging Xcode-generated developer files.
-
Category Management:
- Handles specific developer data categories (
archives
,derived data
,documentation cache
,device support
). - Includes tools to scan, display, and manage these categories.
- Handles specific developer data categories (
-
Powerful ViewModels:
- Manage archives, derived data, documentation caches, and device support with built-in Combine integration and live data updates.
- Support for observing changes in item states, selecting old files, and purging data.
-
Custom Views:
- Pre-built views for listing, scanning, and selecting developer data.
- Integration with CodePurgeKit’s reusable UI components.
-
Device Support Management:
- Scans and lists used and unused device support files.
- Provides the ability to select and purge outdated device support files.
- Integrates with Xcode to detect recently used device support files automatically.
-
Delegation:
- Conforms to a
DeveloperDataDelegate
protocol to enable customization and handle platform-specific actions such as purging items or showing files in Finder.
- Conforms to a
Add the package to your Package.swift
file:
dependencies: [
.package(url: "https://github.com/CodePurge/CodePurgeDeveloperDataKit", branch: "main")
]
Then import it into your project:
import CodePurgeDeveloperDataKit
DeveloperDataCategory
: Enum representing the data categories (archives
,derived data
,documentation cache
,device support
).ArchivePurgeFolder
: Represents archive files generated by Xcode, including metadata like size, creation date, and version.DerivedDataFolder
: Represents derived data folders, useful for optimizing build times or debugging.DocumentationFolder
: Represents API documentation cache files for offline access.DeviceSupportFolder
: Represents device support files used for debugging on physical devices.
DeveloperDataDelegate
: A protocol that enables interaction with platform-specific features such as showing files in Finder or retrieving the current Xcode version.DeviceSupportDelegate
: A protocol that provides methods to load and manage device support files.
SharedDeveloperDataENV
: Shared environment object for managing scan state, categories, and purging actions.ArchiveListViewModel
: Manages archive-related data, including observing changes and selecting old archives.DerivedDataListViewModel
: Manages derived data files, with utilities for selecting files older than a specified date.DocumentationCacheListViewModel
: Handles documentation cache files and determines outdated versions.DeviceSupportViewModel
: Manages used and unused device support files, detecting recently used ones and allowing for selective purging.
DeveloperDataMainView
: Entry point for managing developer data. Provides scanning, viewing, and purging capabilities for all categories.ArchiveListView
: Lists archives with checkboxes for selection and options for showing files in Finder.DerivedDataListView
: Displays derived data folders with tools for selecting old files.DocumentationCacheListView
: Displays the documentation cache, differentiating between the current version and older ones.DeviceSupportView
: Lists used and unused device support files, allowing for selection and removal of outdated entries.
For detailed information, usage examples, and customization options, refer to the comprehensive documentation.
Feedback and contributions are welcome! If you have suggestions or encounter issues, please open an issue or submit a pull request.
This project is licensed under the MIT License.
CodePurgeDeveloperDataKit is a part of the CodePurge ecosystem.