cocoapods-xcremotecache

April 9, 2023 · View on GitHub

The CocoaPods plugin that integrates XCRemoteCache with the project.

Installation

Using RubyGems

gem install cocoapods-xcremotecache

From sources

Build & install the plugin

gem build cocoapods-xcremotecache.gemspec
gem install cocoapods-xcremotecache-{CurrentGemVersion}.gem # e.g. gem install cocoapods-xcremotecache-0.0.1.gem

Usage

  1. Add plugin reference to your project Podfile:
plugin 'cocoapods-xcremotecache'
  1. Configure XCRemoteCache at the top of your Podfile definition:
xcremotecache({
    'cache_addresses' => ['http://localhost:8080/cache/pods'],
    'primary_repo' => 'https://your.primary.repo.git',
    'mode' => 'consumer'
})
  1. (Optional) Unzip all XCRemoteCache binaries to the xcrc_location directory (defaults to XCRC placed next to the Podfile). If you don't provide all binaries in the location, the plugin will try to download the latest XCRemoteCache artifact from the public GitHub page.
  2. Call pod install and verify that [XCRC] XCRemoteCache enabled has been printed to the console.

Configuration parameters

An object that is passed to the xcremotecache can contain all properties supported natively in the XCRemoteCache. In addition to that, there are extra parameters that are unique to the cocoapods-xcremotecache:

ParameterDescriptionDefaultRequired
enabledA Boolean value that enables XCRemoteCache integration to the projecttrue⬜️
xcrc_locationThe location of all XCRemoteCache binaries{podfile_dir}/XCRC⬜️
exclude_targetsComma-separated list of targets that shouldn't use XCRemoteCache[]⬜️
exclude_build_configurationsComma-separated list of configurations that shouldn't use XCRemoteCache[]⬜️
final_targetA target name that is build at the end of the build chain. Relevant only for a 'producer' mode to mark a given sha as ready to use from cacheDebug⬜️
check_build_configurationA build configuration for which the remote cache availability is performed. Relevant only for a 'consumer' modeDebug⬜️
check_platformA platform for which the remote cache availability is performed. Relevant only for a 'consumer' modeiphonesimulator⬜️
modify_lldb_initControls if the pod integration should modify ~/.lldbinittrue⬜️
xccc_fileThe path where should be placed the xccc binary (in the pod installation phase){podfile_dir}/.rc/xccc⬜️
remote_commit_fileThe path of the file with the remote commit sha (in the pod installation phase){podfile_dir}/.rc/arc.rc⬜️
prettify_meta_filesA Boolean value that opts-in pretty JSON formatting for meta filesfalse⬜️
fake_src_rootAn arbitrary source location shared between producers and consumers. Should be unique for a project./xxxxxxxxxx⬜️
disable_certificate_verificationA Boolean value that opts-in SSL certificate validation is disabledfalse⬜️
exclude_sdks_configurationsarray of sdks to not integrate XCRemoteCache (e.g. "watchos*, watchsimulator*") (Experimental)[]⬜️

Uninstalling

To fully uninstall the plugin, call:

gem uninstall cocoapods-xcremotecache