4

Currently we need to work with a library which has been merged into another project. That library has its own podspec and was previously available as a remote pod from its own git repo. After it was merged in the big project, the big project uses that pod with a local path.

We still need that library in our project but fetching the whole "merged" project for that pod does not seem legit.

Is there any way to specify a path in the Podsfile which would be able to retrieve the pod from a folder inside an existing git repo?

Fawkes
  • 3,831
  • 3
  • 22
  • 37
  • You may use `:podspec =>` to specify the location of the podspec. – Larme Aug 23 '17 at 15:10
  • Ended up just creating our own git repo and pushing specifically the sdk there. Since it is a pod, pointing to the new repo in pods file worked. But this is not ideal since every time there'll be a change in the sdk in the merged project we'll have to manually update the sdk in our private repo. – Fawkes Aug 23 '17 at 15:51

1 Answers1

1

As I understand you - you're trying to fetch some existing part of the repo as a cocoapod. So, if this library is not a pod itself - no, it's not possible. You can install libraries (read frameworks) via cocoapods only if they have a pod published, or created by you locally.

You basically have two options here:

  1. Move this code to git-submodule and use it in both projects
  2. Create a pod by yourself (locally, or publish it) and use it in both projects via cocoapods

The second way is preferable, cause cocoapods themselves save you a lot of nerves during construction or maintenance. If you want some help on any approach - feel free to ask here.

Vladyslav Zavalykhatko
  • 15,202
  • 8
  • 65
  • 100
  • The framework is made as a pod and has its own podspec. Just that after it was merged, the big "merged" project itself uses a local path for the pod instead of remote as it was back when it was a separate repo. – Fawkes Aug 23 '17 at 09:46
  • Also we are not responsible for the other "merged" project so can't enforce usage of the sdk from another git repo. – Fawkes Aug 23 '17 at 15:51