11

I'm trying to create a cocoa pod following this tutorial. I'm stuck at the moment where I'm doing the following command:

pod repo push RWPodSpecs RWPickFlavor.podspec

the problem is that I've got the following error:

Validating spec
[!] The `RWPickFlavor.podspec` specification does not validate.

And not further error description unfortunately. What I tried was reinstalling cocoapods and installing cocoapods keys, but it didn't help. I'm still getting the same error. Any ideas, guys?

Andrey Chernukha
  • 21,488
  • 17
  • 97
  • 161

6 Answers6

25

I solved this issue by adding option --allow-warnings.

Shuitao
  • 251
  • 3
  • 4
9

While the OP's issue was fixed, using this command will give more information about anyone else's issue. For me, I forgot to push the new version tag to my remote.

pod repo push [repo] [podspec] --verbose
Jay Whitsitt
  • 937
  • 9
  • 27
2

Oh, the problem was very simple actually. I was simply being unobservant. In my .podspec file I had one of the urls formatted like that : ["https://github.com/Andrey-C/RWPickFlavor.git"]. Once I removed the square brackets around the url the error vanished.

Andrey Chernukha
  • 21,488
  • 17
  • 97
  • 161
1

Sometimes pod spec lint doesn't update changes (this is because of cache).

Once I fixed some errors specified by lint, pushed, updated tag, etc., and ... got the same errors as before.

So you can fix it by cleaning cache:

cd /Users/<#your-user-directory#>/Library/Caches/CocoaPods/Pods

just delete /Pods directory and pod spec lint will work again

Zaporozhchenko Oleksandr
  • 4,660
  • 3
  • 26
  • 48
0

For me, I needed to add a revision tag to my master branch and then git push with all tags before the pod trunk push would pass validation.

Justin Vallely
  • 5,932
  • 3
  • 30
  • 44
-1

Use the following command:

pod trunk push RWPickFlavor.podspec

It publishes your newly created pod to CocoaPods repository, creating a pod with name that specified in your .podspec file.

You also have to use such command to publish a new version of your pod.

Alexander Perechnev
  • 2,797
  • 3
  • 21
  • 35