Search code examples
cocoapodspodspecpodfile

source issue with podfile


I'd like to specify version 5.1.0 of the InstaCart TrueTime library in a Podfile instead of 5.0.3. I think this is the only way to use 5.1.0 since 5.0.3 hasn't been added to the master per https://github.com/instacart/TrueTime.swift/issues/97

(The library is pretty outdated unfortunately.)

According to Add Pod dependency with source to .podspec, the way to do this is add

source 'https://github.com/instacart/TrueTime.swift.git'

at the top, but I then get the following error with 'pod update':

[!] Unable to find a specification for `TrueTime`

I think this error occurs because the source has TrueTime.podspec at the top level instead of inside a '5.1.0' folder, even though my podspec doesn't specify a version:

s.dependency "TrueTime"

Is my thinking correct, and is there a way to solve this issue?


Solution

  • The source attribute is used to refer to a podspec repository, not a single pod.

    To accomplish that goal, you could set up a private specs repository and publish the desired podspec there - then refer to the podspec repo from the Podfile.

    Details at https://guides.cocoapods.org/making/private-cocoapods.html