Native targets cache for Xcode archive builds.
- This tool is intended to be used in CI workflows.
- To reuse cached build products, it changes project files.
- Remote caching is planned but not implemented yet.
- Current implementation supports native targets only. Targets should have framework or static library products.
- Without Bundler:
gem install xcode-archive-cache
- With Bundler: add
gem 'xcode-archive-cache'to Gemfile
XcodeArchiveCache has a simple DSL similar to Cocoapods DSL. Configuration is stored in a file called
Cachefile in the project's root directory.
workspace "Workspace" do configuration "release" do build_configuration "Release" xcodebuild_args "SOME_FLAG='1' -UseModernBuildSystem=NO" end derived_data_path "build" target "Target" do cache "Pods_Target.framework" cache "libStaticLibrary.a" end end
xcode-archive-cache inject --configuration=release --storage="$HOME/build_cache"
xcode-archive-cachebefore building app. This will update the cache and inject cached products into the project.
- Archive the app as usual (Xcode, xcodebuild, Fastlane)
Please refer to the example project for usage examples.