Use CocoaPods CDN for Local Repositories

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

Starting from version 7.79.2, Artifactory supports using CocoaPods CDN for local repositories.

As a prerequisite for using CDN, re-index your repository manually: this is required to create the podspec.json file which CDN uses as the index. To reindex your repository, right-click the repository name in the Artifacts page in the JFrog Platform WebUI, and select Recalculate Index from the drop-down list, or run the Calculate CocoaPods Index REST API.Calculate CocoaPods Index

Cocoapods_reindex.png

Then, to be able to resolve pods from the repository with CDN support, add the following line to your Podfile:

Note

Make sure to replace the placeholders in bold with your own repository path.

source "<REPOSITORY_PATH>"

For example:

source "https://localhost:8080/artifactory/api/pods/coco-local"

After completing the pre-requisites, to use an Artifactory local repository with CocoaPods:

  1. Log into CocoaPods as specified in your standard .netrc file:

    Note

    Make sure to replace the placeholders in bold with your own JFrog machine, username, and password

    machine <MACHINE>
    localhost <YOUR_JFROG_USERNAME>
    password <YOUR_JFROG_PASSWORD>

    For example:

    machine localhost
    localhost admin
    password AKCp2TfQM58F8FTkXo8qSJ8NymwJivmagefBqoJeEBQLSHCZusEH6Z2dmhS1siSxZTHoPPyUWJHDhLGJ45kJKH2jHKWE7Sk
  2. To add an Artifactory CDN repository, run the following command:

    Note

    Make sure to replace the placeholders in bold with your own JFrog domain URL and repository.

    pod repo add-cdn <REPOSITORY_NAME> "<YOUR_JFROG_DOMAIN>/api/pods/<REPOSITORY_PATH>"

    For example:

    pod repo add-cdn coco-local "https://localhost:8080/artifactory/api/pods/coco-local"