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" => "shamsiddin.saidov#gmail.com" }
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:
EDIT 3:
Added screenshot from my project's structure on disc. The structure is created using pod lib create SHMultipleSelect command
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?
Related
I want to create a Cocoapod dependency with a existing framework(A Compiled framework for internal uses which I want to share internally via cocoapods) which is in remote location such as git and drop box.
I am following the Tutorial
Below is the code of podspec file
Pod::Spec.new do |s|
s.name = 'SDK101'
s.version = '0.1.0'
s.summary = 'A Awesomeness of SDK101.'
s.description = <<-DESC
Add long description of the pod here.Awesomeness!!!
DESC
s.homepage = 'https://github.com/'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Sourabh' => 'sourabh.gajbhiye#gmail.com' }
s.source = { :http => 'https://app.box.com/s/ipwollwlh675fkg3oy87rr7nneafafv0', :type => 'zip' }
s.ios.deployment_target = '12.0'
s.platform = :ios
s.ios.vendored_frameworks = 'SDK101.framework'
s.exclude_files = "Classes/Exclude"
end
for this file when i am executing the following command in terminal for the validation of pod I am getting error shown below
pod spec lint --verbose
[!] Error installing SDK101
-> SDK101 (0.1.0)
- ERROR | [iOS] unknown: Encountered an unknown error ([!] /usr/bin/unzip /var/folders/gq/xrq80ysd50nd5frn2zhb89dc0000gn/T/d20210422-75411-1bv4xo/file.zip -d /var/folders/gq/xrq80ysd50nd5frn2zhb89dc0000gn/T/d20210422-75411-1bv4xo
Archive: /var/folders/gq/xrq80ysd50nd5frn2zhb89dc0000gn/T/d20210422-75411-1bv4xo/file.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of /var/folders/gq/xrq80ysd50nd5frn2zhb89dc0000gn/T/d20210422-75411-1bv4xo/file.zip or
/var/folders/gq/xrq80ysd50nd5frn2zhb89dc0000gn/T/d20210422-75411-1bv4xo/file.zip.zip, and cannot find /var/folders/gq/xrq80ysd50nd5frn2zhb89dc0000gn/T/d20210422-75411-1bv4xo/file.zip.ZIP, period.
Analyzed 1 podspec.
[!] The spec did not pass validation, due to 1 error.
After this I followed Cocoapods error installing libopencv-contrib but it didn't helped me.
Please help me what I am doing wrong?
i am trying to install my custom pod created and when i run the pod install i see below error. Any one can please help I did try similar links on stack overflow but no luck.
Error : Unable to find a specification for 'Foo'.
Terminal Logs :
ExampleApp djrecker$ pod install
Analyzing dependencies
Pre-downloading: `Foo` from `https://github.com/deepesh259nitk/mixedFramework.git`, tag `1.0.7`
[!] Unable to find a specification for 'Foo'.
Pod file
# Uncomment the next line to define a global platform for your project
platform :ios, '11.0'
target 'ExampleApp' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for ExampleApp
pod 'Foo', :git => 'https://github.com/deepesh259nitk/mixedFramework.git', :tag => '1.0.7'
end
More pod commands output : pod try , pod install and pod list
AUK03154:ExampleApp djrecker$ pod try Foo
Updating spec repositories
[!] An unexpected version directory `Foo.xcodeproj` was encountered for the `/Users/djrecker/.cocoapods/repos/deepesh259nitk/Foo` Pod in the `Foo` repository.
AUK03154:ExampleApp itrmg$ pod install
Analyzing dependencies
Pre-downloading: `Foo` from `https://github.com/deepesh259nitk/mixedFramework.git`, tag `1.0.7`
[!] Unable to find a specification for 'Foo'.
AUK03154:ExampleApp djrecker$ pod list | grep Foo
AUK03154:ExampleApp djrecker$
pod spec file
Pod::Spec.new do |s|
s.name = "Foo"
s.version = "1.0.7"
s.summary = "This is a iOS framework containing both objective c and swift code"
s.description = "This is a iOS framework containing both objective c and swift code and shows how modules with with POD"
s.homepage = "https://github.com/deepesh259nitk/mixedFramework"
s.license = "MIT"
s.author = { "Deepesh" => "deepesh259nitk#gmail.com" }
s.platform = :ios, "11.0"
s.source = { :git => "https://github.com/deepesh259nitk/mixedFramework.git", :tag => "1.0.7" }
#s.source_files = "Foo/**/*.{h,m,swift}"
#s.source_files = "Foo/**/*.{modulemap}"
#s.source_files = "Foo/**/*.private.modulemap"
# s.exclude_files = "Classes/Exclude"
# s.public_header_files = "Foo/*.h"
s.vendored_frameworks = 'Foo/Foo.framework'
end
Put the podspec in the top level directory at github.com/deepesh259nitk/mixedFramework
I have created sample CocoaPod file and it worked successfully, now on final stage when I am doing Pod Repo Push it showing me error. Below are the command and error which I am getting.
Pod::Spec.new do |s|
s.name = "IDFVSample"
s.version = "1.0.0"
s.summary = "A short description of VFIDOneFramework. Please check this awesome work from me you will like it"
s.description = "This is the best tutorial. Recently given presentation in the world great forum for the member."
s.homepage = "https://github.com/kashiftriffort/IDFVSample"
s.license = "MIT"
s.author = { "KJilani" => "Kashif.triffort#gmail.com" }
s.platform = :ios, "9.0"
s.source = { :git => "https://github.com/kashiftriffort/IDFVSample.git", :tag => "1.0.0" }
s.source_files = "IDFVSample/IDFVSample/IDFVSample.swift"
s.dependency 'Firebase/Core'
end
pod repo push IDFVPodSpecs IDFVSample.podspec --allow-warnings
Validating spec
Cloning spec repo `-1` from ``
[!] Unable to add a source with url `` named `-1`.
You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.
Looks like you have not added the repo containing your specs yet.
Do something like:
pod repo add IDFVSample <git source>
Move your IDFVSample.podspec to the root of your repository(where is already located LICENSE and README files)
I'm getting an error when I'm trying to add GeoFire to my iOS Flutter project which has the FlutterFire Database plugin included. This is what the error looks like:
Resolving dependencies of `Podfile`
[!] Unable to satisfy the following requirements:
- `Firebase (~> 2.1)` required by `GeoFire (1.1.0)`
Specs satisfying the `Firebase (~> 2.1)` dependency were found, but they required a higher minimum deployment target.
My podspec file looks like this atm:
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = 'geofire'
s.version = '0.0.1'
s.summary = 'A new flutter plugin project.'
s.description = <<-DESC
A new flutter plugin project.
DESC
s.homepage = 'http://example.com'
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => 'email#example.com' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.dependency 'GeoFire', '>= 1.1' # Adding GeoFire
s.ios.deployment_target = '8.0'
end
I also tried using the git page in to add Geofire in my podspec file as suggested here: GeoFire giving problems with CocoaPods
s.dependency 'GeoFire', :git => 'https://github.com/firebase/geofire-objc.git'
Is there a (simple) solution for this?
I faced the same kind of issue few days ago.
I think I fixed it by doing the following steps:
Run the command 'pod repo update' (it will update your repo information)
Then run the command 'pod update' (it will update your pods using the latest repo information)
Let me know if this is solving your issue :)
Please try the approach suggested by Bjørn Børresen here:
Since Flutter kind of abstracts away this Cocoapods process. Here's what I did to be able to run "pod repo / update":
Run pod repo update
Set the environment variable FLUTTER_FRAMEWORK_DIR to something that looks like /Users/youruser/bin/flutter/bin/cache/artifacts/engine/ios/. You can do a locate Flutter.podspec to find this directory
From YourFlutterProject/ios run pod update
After this you should be able to run your app again
I'm in the process of writing my very first pod spec, and while I have managed to write a spec that passes validation and pod install seems to install the pod OK the actual source-files are nowhere to be found in my workspace. This is my podfile:
platform :ios, '7.0'
xcodeproj 'NORLabelNodeiOStest'
pod 'NORLabelNode', :path => '~/Programmering/Development/NORLabelNodePodSpec'
pod 'AFNetworking'
As you can see the NORLabelNode pod is installed through a local version of the podspec which looks like this:
Pod::Spec.new do |s|
s.name = "NORLabelNode"
s.version = "0.9.2"
s.summary = "Extension of Apple's SKLabelNode. Allowing multiple lines through the use of \n in the text-string. "
s.description = <<-DESC
Behaves like an ordinary SKLabelNode with the one difference that adding newline characters to the text- property actually adds line-breaks. This is achieved by creating SKLabelNodes as child-nodes, but keeping these as part of the internal (private) logic.
DESC
s.homepage = "https://github.com/nickfalk/NORLabelNode.git"
s.license = 'MIT'
s.author = { "T. Benjamin Larsen" => "benjamin.larsen#noreagle.no" }
s.source = {
:git => "https://github.com/nickfalk/NORLabelNode.git",
:tag => 'v0.9.2'
}
s.social_media_url = 'https://twitter.com/noreagle'
s.platform = :ios, '7.0'
s.ios.deployment_target = '7.0'
s.osx.deployment_target = '10.9'
s.requires_arc = true
s.frameworks = 'SpriteKit'
s.source_files = 'NORLabelNode.{h,m}'
end
Running pod install gives no indication that anything has gone amiss:
Analyzing dependencies
Fetching podspec for `NORLabelNode` from `~/Programmering/Development/NORLabelNodePodSpec`
Downloading dependencies
Installing AFNetworking (2.2.3)
Installing NORLabelNode (0.9.2)
Generating Pods project
Integrating client project
[!] From now on use `NORLabelNodeiOStest.xcworkspace`.
The AFNetworking pod installs the files as expected, but my own NORLabelNode does not. Anyone?
As you can see the NORLabelNode pod is installed through a local version of the podspec which looks like this
That's not how the path option works. It expects a path to the project itself, not the spec.
From the docs:
Using this option CocoaPods will assume the given folder to be the root of the Pod and will link the files directly from there in the Pods project.
If you would like to just use your spec without adding it to the master repo you can create your own repo of specs (docs). Or just place your spec in the correct folder structure in ~/.cocoapods/repos/master