Shamsiddin Saidov
Shamsiddin Saidov

Reputation: 2281

pod spec lint fails with 400

I followed all the steps from https://guides.cocoapods.org/making/using-pod-lib-create to make my openSource library available on cocoapds. At the end of the steps before publishing run pod lib lint command and it passed the test:

 -> SHMultipleSelect (0.1.0)

SHMultipleSelect passed validation.

But pod spec lint command giving some error:

[!] /usr/bin/git clone https://github.com/<GITHUB_USERNAME>/SHMultipleSelect.git /var/folders/fn/49fp5hx941541w0ncv5n28_h0000gn/T/d20150723-39741-1esoisq --single-branch --depth 1 --branch 0.1.0

Cloning into '/var/folders/fn/49fp5hx941541w0ncv5n28_h0000gn/T/d20150723-39741-1esoisq'...
fatal: unable to access 'https://github.com/<GITHUB_USERNAME>/SHMultipleSelect.git/': The requested URL returned error: 400

Searched error through stackoverflow and found this Can not update my pod library. Run pod spec lint SHMultipleSelect.podspec command as accepted answer says and it gived me another error:

[!] /usr/bin/git clone https://github.com/Shamsiddin/SHMultipleSelect.git /var/folders/fn/49fp5hx941541w0ncv5n28_h0000gn/T/d20150723-39842-774kfl --single-branch --depth 1 --branch 0.1.0

Cloning into '/var/folders/fn/49fp5hx941541w0ncv5n28_h0000gn/T/d20150723-39842-774kfl'...
warning: Could not find remote branch 0.1.0 to clone.
fatal: Remote branch 0.1.0 not found in upstream origin
Unexpected end of command stream

Not clear to solve my problem. Can someone show me rote where to go?

Here's my librarys Git url: https://github.com/Shamsiddin/SHMultipleSelect

And my library's .podspec file:

#
# Be sure to run `pod lib lint SHMultipleSelect.podspec' to ensure this is a
# valid spec and remove all comments before submitting the spec.
#
# Any lines starting with a # are optional, but encouraged
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
  s.name             = "SHMultipleSelect"
  s.version          = "0.1.0"
  s.summary          = "An easy-to-use multiple selection view."
  s.description      = <<-DESC
                       An easy-to-use multiple selection view for iOS 7+.
                       DESC
  s.homepage         = "https://github.com/Shamsiddin/SHMultipleSelect"
  # s.screenshots     = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
  s.license          = 'MIT'
  s.author           = { "Shamsiddin" => "[email protected]" }
  s.source           = { :git => "https://github.com/Shamsiddin/SHMultipleSelect.git", :tag => s.version.to_s }
  # s.social_media_url = 'https://twitter.com/Shamsiddin_Said'

  s.platform     = :ios, '7.0'
  s.requires_arc = true

  s.source_files = 'Pod/Classes/**/*'
  s.resource_bundles = {
    'SHMultipleSelect' => ['Pod/Assets/*.png']
  }

  # s.public_header_files = 'Pod/Classes/**/*.h'
  # s.frameworks = 'UIKit', 'MapKit'
  # s.dependency 'AFNetworking', '~> 2.3'
end

EDIT 1:

It turns out i didn't create a tag at my Github repo. I created tag with the version 0.1.0 and run pod spec lint SHMultipleSelect.podspec command again. Now it's giving me another error:

 -> SHMultipleSelect (0.1.0)
    - ERROR | [iOS] The `source_files` pattern did not match any file.

Analyzed 1 podspec.

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

EDIT 2:

Added screenshot from my projects structure: enter image description here

EDIT 3:

Added screenshot from my project's structure on disc. The structure is created using pod lib create SHMultipleSelect command enter image description here

Upvotes: 2

Views: 840

Answers (1)

johnpatrickmorgan
johnpatrickmorgan

Reputation: 2372

Glad to help with your initial problem. Regarding your edited question, it seems there are no files at 'Pod/Classes/**/*'. This file path should be specified relative to the pod spec and should contain files. Is there a folder called Pod in the same folder as your podspec?

Upvotes: 1

Related Questions