Use CocoaPods CDN for Virtual Repositories

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

Starting from version 7.84.x, Artifactory supports using CocoaPods virtual for CDN supported repositories.

Include Only Repositories Using CDN

To be able to resolve artifacts from a CocoaPods virtual CDN repository, the Local and remote repositories that you include in your virtual repository must be CDN enabled. For more information, see Identify Whether a CocoaPods Repository Uses CDN.

To use an Artifactory virtual 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 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://john.jfrog.io/artifactory/api/pods/coco-virtual"
  3. 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-virtual "https://john.jfrog.io/artifactory/api/pods/coco-virtual"