Adding Google cocoapods to Artifactory

Currently we are working in a project that must be developed in an environment behind a firewall and we don't have access to internet so, we are not able to install de pods in the iOS project.

We have the opportunity to use Artifactory to cache the pods, but currently it only works for the ones that are stored in github, so for example GooglePlace, GoogleMaps pods cannot be installed as they are distributed as tgz.

Do you know a way to install those pods in Artifactory? As we have seen, in order to publish them in a Cocoapod repository we will need to a) download the .tgz b) create a specfile in groovy, cause at least we are not able to make use of the .json podspec of google to let it index and recognize the pod.

Maybe the problem is that we are not using the json file properly. As far as we know, the spec file has to be inside the tgz file, but it didn't recognize the file as I mention before.


Solution 1:

We were able to make it work. It was just a problem with the tar.gz file. The steps we follow was in a osx:

  1. Download the json spec file with curl
  2. Download the tar.gz source that we can locate in the json spec the pod file
  3. Uncompress the tar.gz
  4. Add the json spec file to the root folder of the uncompressed data
  5. Compress with the gnu-tar (that can be installed with brew) the file, with tar.gz extension
  6. Upload to artifactory

With those steps, and using jfrog repo-art plugin we can use the pods without internet connection