Updated to Cocoapods to 0.38.0 and pod trunk push-ed my latest pod 'Spark-SDK', completed successfully but now trying to install this pod in a project fails:
Unable to find a specification for Spark-SDK
doubled checked name and all is OK, seems like a case sensitivity issue though nothing changed on my side/podspec except for bumping version
What is wrong?
Is the platform in your Podfile compatible with the spec's minimum deployment target?
Didn't specify platform in podfile. as a test just added
pod 'Spark-SDK'
Then the deployment target in your Xcode project might not be compatible
Appreciate the help but I don't think this is the issue
podspec specifies:
s.platform = :ios, '7.1'
project is 8.0, tried now also 7.1 but always get:
[!] Unable to find a specification for Spark-SDK
https://github.com/CocoaPods/Specs/blob/master/Specs/Spark-SDK/0.3.0/Spark-SDK.podspec.json
Can you try running pod repo update
?
Sure:
Updating spec repo `master`
Already up-to-date.
then pod install with same results.
Interesting find:
when I change the Podfile to read:
pod 'spark-sdk'
(simply lowercase)
I get:
[!] Unable to find a specification for Spark-SDK/Helpers (= 0.3.0)
depended upon by spark-sdk
looks like interpreter progressed to the next part of podspec (reading subspecs) which means something weird is going with case sensitivity.
Any feedback appreciated as currently no users can install/use my pod library
I can't reproduce this whatsoever, sorry. It installs fine for me.
Oh, the strangest thing! What might be causing that?
Idos-MacBook-Pro:testpod ido$ cat Podfile
pod 'Spark-SDK'
Idos-MacBook-Pro:testpod ido$ pod install
Updating local specs repositories
Analyzing dependencies
[!] Unable to find a specification for `Spark-SDK`
Idos-MacBook-Pro:testpod ido$ pod --version
0.38.1
Idos-MacBook-Pro:testpod ido$
I'll try now on another machine
What's the output of pod repo list
, pod search Spark-SDK
, and pod spec cat Spark-SDK
?
Here:
Idos-MBP:testpod ido$ pod repo list
master
- Type: git (master)
- URL: https://github.com/CocoaPods/Specs.git
- Path: /Users/ido/.cocoapods/repos/master
1 repo
Idos-MBP:testpod ido$ pod search Spark-SDK
-> spark-sdk (0.3.0)
Particle iOS Cloud SDK for interacting with products/project powered by Cores/Photons via Particle Cloud
pod 'spark-sdk', '~> 0.3.0'
- Homepage: https://github.com/spark/spark-sdk-ios
- Source: https://github.com/spark/Spark-SDK-ios.git
- Versions: 0.3.0, 0.2.10, 0.2.9, 0.2.8, 0.2.7, 0.2.6, 0.2.5, 0.2.4, 0.2.3, 0.2.2, 0.2.1, 0.2.0, 0.1.9,
0.1.8, 0.1.7, 0.1.6, 0.1.5, 0.1.4, 0.1.3, 0.1.2, 0.1.1, 0.1.0 [master repo]
- Subspecs:
- Spark-SDK/Helpers (0.3.0)
- Spark-SDK/SDK (0.3.0)
Idos-MBP:testpod ido$ pod spec cat Spark-SDK
{
"name": "Spark-SDK",
"version": "0.3.0",
"summary": "Particle iOS Cloud SDK for interacting with products/project powered by Cores/Photons via Particle Cloud",
"description": " Particle (formerly Spark) iOS Cloud SDK Cocoapod library\n The Particle iOS Cloud SDK enables iOS apps to interact with Particle-powered connected products via the Particle Cloud.\n Library will allow you to easily manage active user sessions to Particle cloud, query for device info,\n read and write data to/from Spark Core/Photon devices and (via exposed variables and functions)\n publish and subscribe events to/from the cloud or to/from devices (coming soon).\n notice: Spark has been rebranded as Particle\n",
"homepage": "https://github.com/spark/spark-sdk-ios",
"screenshots": "http://i59.tinypic.com/mrthqc.jpg",
"license": "Apache 2.0",
"authors": {
"Particle": "[email protected]"
},
"source": {
"git": "https://github.com/spark/Spark-SDK-ios.git",
"tag": "0.3.0"
},
"social_media_url": "https://twitter.com/particle",
"platforms": {
"ios": "7.1"
},
"requires_arc": true,
"public_header_files": "Pod/Classes/*.h",
"source_files": "Pod/Classes/Spark-SDK.h",
"resource_bundles": {
"Spark-SDK": [
"Pod/Assets/*.*"
]
},
"subspecs": [
{
"name": "Helpers",
"source_files": "Pod/Classes/Helpers/*.{h,m}",
"ios": {
"frameworks": [
"SystemConfiguration",
"Security"
]
}
},
{
"name": "SDK",
"source_files": "Pod/Classes/SDK/Spark*.{h,m}",
"dependencies": {
"AFNetworking": [
],
"Spark-SDK/Helpers": [
]
}
}
]
}
Idos-MBP:testpod ido$ pod install
Updating local specs repositories
Analyzing dependencies
[!] Unable to find a specification for `Spark-SDK`
Idos-MBP:testpod ido$
I'd just try mv ~/.cocoapods/repos/master/Specs/spark-sdk ~/.cocoapods/repos/master/Specs/Spark-SDK
, as it looks like you've changed the capitalization of your spec at some point?
That did the trick! Thanks a lot!
I did change capitalization I think, that was on 0.1 several months ago, didn't have any issues installing the pod locally up till now. Nevermind, it's all good now since my uesrs are not blocked and me neither now.
Thank you
I found this thread because I had the same problem just now when trying to
pod install
or pod update
the following:
pod "Spark-SDK"
I used:
mv ~/.cocoapods/repos/master/Specs/spark-sdk ~/.cocoapods/repos/master/Specs/Spark-SDK
then pod install
worked fine.
Ran into this same issue when trying to point to a specific repository and branch other than the official release in a .podspec!
@rchatham I think I have the same issue , I'm trying to install a pod directly from its git url and specific branch but I get back
[!] Unable to find a specification for 'MyPod'
.
If I try to install the same pod without specifying any option everything works as expected.
I'm using CocoaPods v1.1.1.
Below there is an small edited version of the stacktrace I got:
-> Pre-downloading: `MyPod` from `{git_url}`, branch `{git_branch}`
$ /usr/bin/git ls-remote {git_url} {git_branch}}
3123a22aa417f89f066a7869a45ca58179fae0a2 refs/heads/feature/{git_branch}
d09e6d25cd840884155321d8cd86c5e9e64f5dec refs/heads/{git_branch}
> Git download
> Git download
$ /usr/bin/git clone {git_url} /var/folders/40/419ts8s15_zd6l_wl45sr__c0000gn/T/d20161105-94038-12yjji --template=
Cloning into '/var/folders/40/419ts8s15_zd6l_wl45sr__c0000gn/T/d20161105-94038-12yjji'...
$ /usr/bin/git -C /var/folders/40/419ts8s15_zd6l_wl45sr__c0000gn/T/d20161105-94038-12yjji checkout --quiet 3123a22aa417f89f066a7869a45ca58179fae0a2
[!] Unable to find a specification for 'MyPod'.
/Users/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.1.1/lib/cocoapods/external_sources/abstract_external_source.rb:117:in `block in pre_download'
/Users/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.1.1/lib/cocoapods/user_interface.rb:85:in `titled_section'
/Users/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.1.1/lib/cocoapods/external_sources/abstract_external_source.rb:112:in `pre_download'
/Users/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.1.1/lib/cocoapods/external_sources/downloader_source.rb:13:in `fetch'
/Users/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.1.1/lib/cocoapods/installer/analyzer.rb:639:in `fetch_external_source'
/Users/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.1.1/lib/cocoapods/installer/analyzer.rb:615:in `block (2 levels) in fetch_external_sources'
/Users/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.1.1/lib/cocoapods/installer/analyzer.rb:614:in `each'
/Users/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.1.1/lib/cocoapods/installer/analyzer.rb:614:in `block in fetch_external_sources'
/Users/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.1.1/lib/cocoapods/user_interface.rb:64:in `section'
/Users/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.1.1/lib/cocoapods/installer/analyzer.rb:613:in `fetch_external_sources'
/Users/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.1.1/lib/cocoapods/installer/analyzer.rb:73:in `analyze'
/Users/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:236:in `analyze'
/Users/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:150:in `block in resolve_dependencies'
/Users/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.1.1/lib/cocoapods/user_interface.rb:64:in `section'
/Users/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:149:in `resolve_dependencies'
/Users/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:110:in `install!'
/Users/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.1.1/lib/cocoapods/command/install.rb:37:in `run'
/Users/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/claide-1.0.1/lib/claide/command.rb:334:in `run'
/Users/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.1.1/lib/cocoapods/command.rb:50:in `run'
/Users/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.1.1/bin/pod:55:in `<top (required)>'
/Users/user/.rbenv/versions/2.2.2/bin/pod:23:in `load'
/Users/user/.rbenv/versions/2.2.2/bin/pod:23:in `<main>'
Is it there something else I can provide to help with this issue?
Did you try running the git commands it outputted, and going into the folder to verify that the Podspec is not there?
@orta yes I tried and the Podspec is actually there. Also double checked any capitalisation issue in the name.
Quick update:
By following all the steps from the stacktrace I published, I have just found out that while the Podspec is available at the command:
/usr/bin/git clone {git_url} /var/folders/40/419ts8s15_zd6l_wl45sr__c0000gn/T/d20161105-94038-12yjji --template=
It actually disappears when this commands is executed:
/usr/bin/git -C /var/folders/40/419ts8s15_zd6l_wl45sr__c0000gn/T/d20161105-94038-12yjji checkout --quiet 3123a22aa417f89f066a7869a45ca58179fae0a2
I'm not sure how it determines to checkout 3123a22aa417f89f066a7869a45ca58179fae0a2
, any idea?
EDIT:
When ls
branches (/usr/bin/git ls-remote {git_url} {git_branch}}
) the output is
3123a22aa417f89f066a7869a45ca58179fae0a2 refs/heads/feature/{git_branch}
d09e6d25cd840884155321d8cd86c5e9e64f5dec refs/heads/{git_branch}
I'm interested in the second one but the first one is picked.
EDIT 2:
A solution would be to run the git ls
command by pre appending the refs/heads/
to avoid conflicts like in this case. What do you think? Is this valid material for a small PR?
My proposal is to run the ls
command as follow:
/usr/bin/git ls-remote {git_url} refs/heads/{git_branch}
I just updated the repo via pod repo update
and voila, it works!!
@fabiomassimo I have the same issue. trying to install a private pod from a specific branch. Have you found a solution?
Most helpful comment
Can you try running
pod repo update
?