Cocoapods: how to create private CDN trunk

Created on 23 Oct 2019  Â·  3Comments  Â·  Source: CocoaPods/CocoaPods

Report

What did you do?

ℹ Please replace these two lines with what you did.
e.g. Run pod install

What did you expect to happen?

ℹ Please replace these two lines with what you expected to happen.
e.g. Install all pod dependencies correctly.

What happened instead?

ℹ Please replace these two lines with of what happened instead.
e.g. Pod A is missing the subspec B for target C.

CocoaPods Environment

ℹ Please replace these two lines with the output of pod env.
e.g. via pod env | pbcopy

Project that demonstrates the issue

ℹ Please link to a project we can download that reproduces the issue.
You can delete this section if your issue is unrelated to build problems,
i.e. it's only an issue with CocoaPods the tool.

How to transform private git repo to CDN?

Most helpful comment

@dnkoutso, is there any plan to support CDNs for private specs repos?

Nexus Repository Manager (NXRM) now supports proxying Cocoapods repos (https://blog.sonatype.com/cocoapods-conda-in-nexus-repository) but it only works if the repo is behind a CDN. It'd be great to be able to use it for private specs repos!

All 3 comments

Need to have an all_pods.txt file.

      def cdn_url?(url)
        url =~ %r{^https?:\/\/} &&
          REST.head(url + '/all_pods.txt').ok?
      rescue => e
        raise Informative, "Couldn't determine repo type for URL: `#{url}`: #{e}"
      end

Like so:
https://cdn.cocoapods.org/all_pods.txt

Noone has attempted this so it might not fully work. Going to close for now.

@dnkoutso, is there any plan to support CDNs for private specs repos?

Nexus Repository Manager (NXRM) now supports proxying Cocoapods repos (https://blog.sonatype.com/cocoapods-conda-in-nexus-repository) but it only works if the repo is behind a CDN. It'd be great to be able to use it for private specs repos!

@dnkoutso
How the trunk CDN works together with private spec sources?

Was this page helpful?
0 / 5 - 0 ratings