CocoaPods CDN repositories
Arka serves the CocoaPods CDN version index, shards, and podspecs. Publish archives and specs to private Hosted, then configure the CDN in each consuming Podfile.
Create repositories
Run these Bash commands with an authenticated administrator arkactl profile and jq. Replace the endpoint and upstream address. Grant the publisher Hosted write access and the consumer read access to Group and the relevant members. For each identity, sign in and run arkactl --json tokens create --name cocoapods-ci --expires-in-days 30 | jq -er .plaintext. Store each token directly in your secret manager.
export ARKA_URL=https://packages.example.org
hosted=$(arkactl --json repo create --name cocoapods-hosted --type hosted --format cocoapods | jq -er .id)
proxy=$(arkactl --json repo create --name cocoapods-proxy --type proxy --format cocoapods \
--upstream-url https://cdn.cocoapods.org | jq -er .id)
arkactl repo create --name cocoapods-group --type group --format cocoapods --member "$hosted,$proxy"
export WRITE="$ARKA_URL/repository/cocoapods-hosted"
export READ="$ARKA_URL/repository/cocoapods-group"Publish the archive and podspec
Set the consumer URL and archive SHA-256 in the Ruby podspec’s s.source. Include the source files declared in the podspec in the archive.
s.source = { :http => 'https://packages.example.org/repository/cocoapods-group/pods/AcmeKit/1.2.3/AcmeKit-1.2.3.tar.gz',
:sha256 => '<64-digit SHA-256>' }pod ipc spec AcmeKit.podspec > AcmeKit.podspec.json
curl --fail-with-body -sS -H "Authorization: Bearer $ARKA_WRITE_TOKEN" \
-T AcmeKit-1.2.3.tar.gz "$WRITE/pods/AcmeKit/1.2.3/AcmeKit-1.2.3.tar.gz"
curl --fail-with-body -sS -H "Authorization: Bearer $ARKA_WRITE_TOKEN" \
-T AcmeKit.podspec.json "$WRITE/specs/AcmeKit/1.2.3/AcmeKit.podspec.json"Install
# Podfile
source 'https://packages.example.org/repository/cocoapods-group/'
platform :ios, '15.0'
target 'ExampleApp' do
pod 'AcmeKit', '1.2.3'
endRun pod install --repo-update and commit Podfile.lock. Group searches specs in member order. The archive URL comes from each podspec’s source. Public CDN specs may point to external Git or HTTP hosts, so allow the required hosts in production network policy. The test matrix uses anonymous reads. For a private CDN, verify that CocoaPods metadata requests and archive downloads both work with the gateway’s authentication. Keep tokens out of the Podfile and podspec.
| Symptom | What to check |
|---|---|
| Pod missing | Inspect CocoaPods-version.yml, all_pods_versions_*.txt, and Specs/<three-level-shard>/.... |
| Archive checksum fails | Verify the URL and SHA-256 in s.source and the archive directory structure. |
| Linux test requires rsync | Install rsync. Linux can verify CDN and source installation. Run Xcode builds on macOS. |