Getting Started
XCCacheAgent is a powerful macOS app designed to optimize build times in Xcode projects by caching Swift Package Manager (SPM) dependencies as xcframeworks. This innovative approach enables efficient reuse of precompiled binaries, dramatically reducing build times and accelerating the development process.
Key Features
Swift Package Manager Support
Addresses the gap in caching tools by providing robust, native support for Swift packages, making it the ideal solution for modern iOS development workflows.
Efficient Build Caching
Reduces build times by caching frameworks as xcframeworks, eliminating the need for repeated compilation of unchanged dependencies.
Seamless Integration
Automatically integrates with Xcode projects, replacing source dependencies with prebuilt binaries when available, without disrupting your existing workflow.
Cache as XCFrameworks
XCCacheAgent provides comprehensive functionality to build Swift package targets into xcframeworks. These xcframeworks can be integrated into your project through various methods, such as declaring a binary target in the package manifest.
The tool leverages the xcframework format to ensure compatibility across different architectures and platforms, making cached dependencies universally usable across your development team and CI/CD pipelines.
For detailed technical information about the packaging process, refer to the Knowledge Base section.
Why XCFrameworks?
XCFrameworks provide a universal binary format that works across different architectures and platforms, ensuring maximum compatibility and performance.
Cache Management
Umbrella Package
XCCacheAgent manages a special umbrella package located at xccache/packages/umbrella to handle cache dependencies within your project. When a cache hit occurs,
it seamlessly replaces the original source code dependency with the corresponding
prebuilt xcframework.
Cache Fallback
In the event of a cache miss, XCCacheAgent automatically falls back to using the original source code dependency, ensuring uninterrupted development without manual intervention or workflow disruption.
Cache Validation Model
XCCacheAgent employs a robust checksum-based validation model to ensure cache integrity:
- Checksum-based validation: Each xcframework is associated with a checksum calculated from all files in the package target
- Automatic invalidation: If the checksum doesn't match (indicating source code changes), a cache miss is triggered
- Consistency guarantee: This ensures that cached dependencies always reflect the current state of your source code
Why Use XCCacheAgent?
Faster Build Times
Experience dramatically reduced build times by reusing precompiled dependencies, especially beneficial for large projects with many external dependencies.
Team Efficiency
Share cached dependencies across your development team, reducing onboarding time and ensuring consistent build environments for all developers.
CI/CD Optimization
Accelerate your continuous integration pipelines by leveraging cached dependencies, reducing build times and infrastructure costs.
Zero Configuration
Works seamlessly with existing Swift Package Manager workflows without requiring changes to your project structure or build scripts.
