ARTIFACTORY: How to configure a CocoaPods smart repository

ARTIFACTORY: How to configure a CocoaPods smart repository

Products
Frog_Artifactory
Content Type
Use_Case
AuthorFullName__c
Zhang Hailang
articleNumber
000006805
FirstPublishedDate
2025-12-31T07:47:16Z
lastModifiedDate
2025-12-31
Introduction 

This guide explains how to configure a multi-level CocoaPods repository proxy using Artifactory, building a smart repository chain that enables hierarchical dependency management across multiple Artifactory instances.

Resolution 

1. Configure Remote CocoaPods Repository on Node A

Configuration Details:
User-added image 
2. Configure Remote CocoaPods Repository on Node B

Configuration Details:
  • URL: https://<Node A>/artifactory/api/pods/zhl-coco-r
  • Git Provider: Artifactory
  • Specs Repository URL: https://<Node A>/artifactory/api/pods/zhl-coco-r
  • CDN URL: https://<Node A>/artifactory/api/pods/zhl-coco-r
  • External Dependencies Enabled is turned on
User-added image 
User-added image 

3. Podfile Configuration

Configure the Podfile to point to Node B's Artifactory remote repository:
platform :ios, '13.0'

source "http://127.0.0.1:8081/artifactory/api/pods/zhl-coco-proxy"

target 'cocotest' do
  use_frameworks!
  pod 'Sentry', '= 8.9.0'
end
4. Clear Client Cache

Clear the CocoaPods client cache before installation:
rm -rf Pods Podfile.lock
pod cache clean --all
5. Configure Pod Client Authentication to Node B

Set up authentication for Artifactory access:
# Edit .netrc file
vim ~/.netrc
Add the following content:
machine 127.0.0.1
login admin
password <TOKEN>
Configure CocoaPods repository:
pod repo add-cdn zhl-coco-proxy "http://127.0.0.1:8081/artifactory/api/pods/zhl-coco-proxy"
6. Execute Pod Install

Run pod install with verbose mode to monitor the process:
pod install --verbose
User-added image 
User-added image 

Logs in Node B’s artifactory-request-out.log show artifacts are actually downloaded from Node A
2025-12-25T06:55:17.296Z|0c3b3ce769eb3c8e|zhl-coco-proxy|hailangz|GET|https://NodeA/artifactory/api/pods/zhl-coco-r/refs/getsentry/sentry-cocoa|200|0|0|1691
2025-12-25T06:55:18.138Z|0c3b3ce769eb3c8e|zhl-coco-proxy|hailangz|GET|https://NodeA/artifactory/zhl-coco-r/getsentry/sentry-cocoa/gitrefs:properties|302|0|0|374
2025-12-25T06:55:18.872Z|0c3b3ce769eb3c8e|zhl-coco-proxy|hailangz|GET|NodeA/artifactory/api/pods/zhl-coco-r/refs/getsentry/sentry-cocoa|200|0|0|294
2025-12-25T06:55:21.241Z|0c3b3ce769eb3c8e|zhl-coco-proxy|hailangz|HEAD|https://NodeA/artifactory/api/pods/zhl-coco-r/downloadTag/getsentry/sentry-cocoa/8.9.0?ext=tar.gz|200|0|5144204|1882
2025-12-25T06:55:21.480Z|0c3b3ce769eb3c8e|zhl-coco-proxy|hailangz|GET|https://NodeA/artifactory/zhl-coco-r/getsentry/sentry-cocoa/tags/8.9.0/sentry-cocoa-8.9.0.tar.gz:properties|302|0|0|226
7. View Results

User-added image 

For more information, refer to the Smart Remote Repositories documentation: 
https://jfrog.com/help/r/jfrog-artifactory-documentation/smart-remote-repositories
https://jfrog.com/help/r/jfrog-artifactory-documentation/cocoapods-repositories