6

I have 2 private pods in my pod specs repository, let's say Pod1 and Pod2.

I want to include Pod2 as a dependency of Pod1, so I tried adding this line in Pod1.podspec:

spec.dependency 'Pod2', '~> 1.0.2'

Then, I tried linting my pod with a pod spec lint, and got this error:

ERROR | [iOS] unknown: Encountered an unknown error (Unable to find a specification for Pod2 (~> 1.0.2) depended upon by Pod1

After a few research, I found this thread on SO recommending to specify the sources on the lint command:

pod spec lint --sources='{MY_POD1_REPO_URL.git, MY_POD2_REPO_URL.git}'

Now, I'm getting this error instead:

  • ERROR | [iOS] unknown: Encountered an unknown error (An unexpected version directory Classes was encountered for the /Users/me/.cocoapods/repos/bitbucket-pod2.repo/Pod2 Pod in the Pod2 repository.) during validation.

What should I do? Thank you for your help.

  • in your pod file fill the source of private pod source 'https://github.com/YourCustomPod/Specs.git' – Alexandr Kolesnik Aug 06 '19 at 08:50
  • maybe this can help you https://stackoverflow.com/questions/44842837/podfile-path-of-local-pod-relative-to-projectpath-possible/44855971#44855971 – Reinier Melian Aug 06 '19 at 09:01
  • Thank you for your answers but there is something I'm missing... I don't have a Podfile yet, only a framework and a library, each of them exported as a Pod with their .podspec file. So I don't understand in which Podfile I'd be supposed to add this? –  Aug 06 '19 at 09:15

1 Answers1

6

Use the --include-podspecs= option like

pod lib lint --include-podspecs=\{Pod2.podspec\} Pod1.podspec

There's a script for finding all podspecs in the same directory and adding them to the pod lib lint line here.

Rich
  • 8,108
  • 5
  • 46
  • 59
Paul Beusterien
  • 27,542
  • 6
  • 83
  • 139