Cocoapods: Unable to Find a Specification for [Privatespec] Depended Upon by [Privateclientspec]

Cocoapods: Unable to find a specification for [PrivateSpec] depended upon by [PrivateClientSpec]

The reason is that the pod spec linter is only checking the master specs, so it can't find your private one.

You'll need to use the --sources option, like this:

pod spec lint --sources='git@our-private-spec-repo:iOS/Specs.git,https://github.com/CocoaPods/Specs'

Two things two note:

  • Your private specs need to be online, can't check on a local one
  • If you depend on other pods you'll need to add the URL for their Spec repo too, that's why in the example we have https://github.com/CocoaPods/Specs too.

By running pod spec lint --help you can read more about this option:

--sources=https://github.com/artsy/Specs   The sources from which to pull
dependant pods (defaults to
https://github.com/CocoaPods/Specs.git).
Multiple sources must be
comma-delimited.

More on this here and here

Unable to find a specification for [PUBLIC POD] depended upon by [PRIVATE POD]

Well, my problem was that I didn't include the Cocoapods master repository on my project's Podfile.

The official CocoaPods source is implicit. Once you specify another
source, then it will need to be included.

So I changed my Podfile to include it

source 'https://bitbucket.org/square1mobileteam/square1-specs'
source 'https://cdn.cocoapods.org/'

And it works.

Private cocoapod in development fails to lint when attempting to access private dependency

I modified my lint command to the following and now it works:

pod lib lint --sources=my_repo,trunk

Apparently, you have to provide the private repo to the lint command with the --sources flag.

In my case, my_repo is needed to include my private repo, while trunk is required to include public pods. Combining the two makes cocoapods happy.

Unable to find a specification for GooglePlaces

This seemed to have worked for me:

source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target 'WhatsOpen' do
pod 'GoogleMaps'
pod 'GooglePlacesAPI'
end

This was after trying Nilesh Jha's answer.

It also said
[!] GooglePlaces has been deprecated in favor of GooglePlacesAPI
So I replaced 'GooglePlaces' with 'GooglePlacesAPI' and it seems satisfied.

Delete a version from a private PodSpecs repository?

git commands are the only way to do it. There is not a pod command. See the docs at https://guides.cocoapods.org/terminal/commands.html#group_repos

Feel free to send a PR to CocoaPods to add such a command.

Cocoapods: pod lib lint giving me 273 errors, all seem to come from SnapKit

Looks like my hunch that it was a Swift versioning issue was correct. Saw on SnapKit's Readme that Swift 2.x requires SnapKit version 0.22.0, whereas version 3.0.0 and greater is Swift 3.x.

Before, my podspec had the following line for SnapKit:

s.dependency 'SnapKit'

So I belive the lint was inspecting the current version of SnapKit (which is in Swift 3), so I changed that line to this:

s.dependency 'SnapKit', '~> 0.22.0'

and passed lint.



Related Topics



Leave a reply



Submit