Sebastian L
Sebastian L

Reputation: 924

Issue when creating my first CocoaPod

I am trying to create my first pod and is following this tutorial: http://www.sitepoint.com/creating-cocoapods/

But when I do:

pod spec lint GLLingoManager.podspec

I get following error:

$ pod spec lint GLLingoManager.podspec

 -> GLLingoManager (0.1.0)
    - ERROR | [OSX] unknown: Encountered an unknown error ([!] /Applications/Xcode.app/Contents/Developer/usr/bin/git clone https://github.com/xeppen/GLLingoManager.git /var/folders/v6/tdz6zc7j10j_k0pc1vy627zm0000gn/T/d20160504-76297-8l71fj --template= --single-branch --depth 1 --branch 0.1.0

Cloning into '/var/folders/v6/tdz6zc7j10j_k0pc1vy627zm0000gn/T/d20160504-76297-8l71fj'...
warning: Could not find remote branch 0.1.0 to clone.
fatal: Remote branch 0.1.0 not found in upstream origin
) during validation.

Analyzed 1 podspec.

[!] The spec did not pass validation, due to 1 error.

I dont understand what is wrong. What should I do?

Upvotes: 28

Views: 9771

Answers (4)

arango_86
arango_86

Reputation: 4425

Sometimes the following command line will create a problem, if you are copy pasting into terminal.

Example

//incorrect
git tag ‘0.1.0’
//Will create a tag ‘0.1.0’

//correct
git tag '0.1.0'
//will create a tag 0.1.0

So better to type the single quotes, it may prevent this kind of unexpected issues. And go check your repo whether these tags are created properly.

Upvotes: 2

S Yoshida
S Yoshida

Reputation: 338

You can also add a tag to your branch in terminal:

git tag 0.1.0
git push --tags

Upvotes: 4

Dair
Dair

Reputation: 16240

Add a 0.1.0 version for your github repo. Image from Github incase the link dies:

How to create a version.

Upvotes: 47

Peter DeWeese
Peter DeWeese

Reputation: 18333

You have pointed to a branch called 0.1.0 in your podspec, and you simply need to push a branch of that name to github. Many people use tags instead of branches to indicate which commit to use for each pod version, and I suggest that you do this instead of pointing to a branch. Please post the source section of your podspec for more specific details.

Upvotes: 5

Related Questions