-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined method `split' for nil:NilClass #327
Comments
I thought the problem could be coming from the fact that OCHamcrest does not have a podspec file in it's repo. So I defined it in the Podfile, but I get a new error: Podfileplatform :ios, '5.0'
target :test do
link_with 'FujiTests'
dependency 'Specta'
dependency 'Expecta', :git => 'https://github.com/TrahDivad/expecta.git'
dependency do |mockito|
mockito.name = 'OCMockito'
mockito.version = '0.22'
mockito.source = { :git => 'https://github.com/TrahDivad/OCMockito.git' }
mockito.source_files = 'Source/OCMockito/*.{h,m}'
mockito.dependency 'OCHamcrest' do |hamcrest|
hamcrest.name = 'OCHamcrest'
hamcrest.version = '1.8'
hamcrest.source = { :git => 'https://github.com/TrahDivad/OCHamcrest.git' }
hamcrest.source_files = 'Source/OCHamcrest.h', 'Source/Core/**/*.{h,m,mm}', 'Source/Library/**/*.{h,m,mm}'
hamcrest.clean_paths = "Examples", "Documentation", "Source/Tests", "Source/TestSupport"
end
end
end Error
|
The problem was in old OCHamcrest source url in spec repo. It was updated in master branch, but not in 0.6 branch which is used by cocoapods 0.6.0-rc2. I've merged master branch of specs into 0.6 branch. And now all pods in your Podfile could be install. Please check. |
Perfect! |
Ok, this was a false positive, the problem is still happening, but it seems the error has changed. Podfileplatform :ios, '5.0'
target :test do
link_with 'FujiTests'
dependency 'Specta'
dependency 'Expecta', :git => 'https://github.com/TrahDivad/expecta.git'
dependency do |mockito|
mockito.name = 'OCMockito'
mockito.version = '0.22'
mockito.source = { :git => 'https://github.com/TrahDivad/OCMockito.git' }
mockito.source_files = 'Source/OCMockito/*.{h,m}'
mockito.dependency do |hamcrest|
hamcrest.name = 'OCHamcrest'
hamcrest.version = '1.8'
hamcrest.source = { :git => 'https://github.com/TrahDivad/OCHamcrest.git' }
hamcrest.source_files = 'Source/OCHamcrest.h', 'Source/Core/**/*.{h,m,mm}', 'Source/Library/**/*.{h,m,mm}'
hamcrest.clean_paths = 'Examples', 'Documentation', 'Source/Tests', 'Source/TestSupport'
end
end
end Error
|
when I've played with your problem yesterday I've also meet this problem when I removed pod name from dependency:
with:
hope it will solve your problem. btw, i had fully completed pod installation with your Podfile yesterday) |
This does not solve my problem because the |
well, I don't really know how For this you could copy current spec from CocoaPods/Specs repo, edit it as you need. Put in into gist. And in your Podfile simply use: dependency 'CocoaLumberjack', :podspec => 'https://raw.github.com/gist/2779752/87ca2283f61651a27c72db86ee876329e91bc306/0.5.1' Or maybe someone else will help you with another advice) |
As far as I'm concerned, declaring a dependency with podfile syntax in a podspec is not supported. I think that you can solve your problem in the podfile doing somthing like: target :test do
....
dependency do |hamcrest|
hamcrest.name = 'OCHamcrest'
hamcrest.version = '1.8'
hamcrest.source = { :git => 'https://github.com/TrahDivad/OCHamcrest.git' }
hamcrest.source_files = 'Source/OCHamcrest.h', 'Source/Core/**/*.{h,m,mm}', 'Source/Library/**/*.{h,m,mm}'
hamcrest.clean_paths = 'Examples', 'Documentation', 'Source/Tests', 'Source/TestSupport'
end
dependency do |mockito|
...
mockito.dependency = 'OCHamcrest'
end
end |
I'm having this same problem, though this is my first go at cocoapods, so it could be user error. I am trying to convert a couple small projects over to cocoapods before trying it out in bigger ones, but keep encountering problems. Stack
Podfileplatform :ios
workspace 'AMSpringboardDemo.xcworkspace'
xcodeproj 'AMSpringboardDemo/AMSpringboardDemo.xcodeproj'
dependency 'AMFoundation', :git => 'https://github.com/amrox/AMFoundation.git', :commit => '61fd3da0a823b7d8b531447d2776ddd0646a81ea'
dependency 'AMSpringboard', :git => 'https://github.com/amrox/AMSpringboard.git', :commit => '343ece5f29b6601dc9660b4f57017bc0089da425' AMFoundation.podspec
AMSpringboard.podspec
Error
|
Try converting
to
For this to work it is important that AMFoundation is loaded before AMSpringboard in your podfile. Is there a reason why you haven't submitted the your libraries to the specs repo? |
To be clear, the syntax that you used is only supported in the podfile and not inside a specification. |
What if I want to declare a dependency in my podspec file that points to a custom git repo? |
In that case I would just suggest to create another repo in |
Yes, several. I wanted to get them working privately before pushing them publicly, because I don't really know what I'm doing yet. Also, I hope to use cocoapods with some large, closed-sourced projects. The ability to pull directly from a private repo instead of a public index is important to me. |
I just asked because the libraries where in a public repo. Anyway, the best solution with for custom specs depending on other custom specs is to create the repo (either private or public). It is very easy to do and easier to maintain. |
Thank you for clarifying. I thought I saw it done that way in docs, but looking back I can't find it. I must have confused it with the Podfile dependency options. However, |
Yes good advice. I'll try forking the Specs repo and adding my specs there, and report back. |
No need to fork the specs repo. You can simply add a folder in
Note that currently cocoapods does not handle completely adding a pod with the same name to two repos. |
Can we close the issue? |
Closing as apparently resolved. Please reopen if needed. |
Windows Azure iOS Toolkit Pod
Report
I tried to change the git repository of a dependency of a Pod-defined spec dependency, and it dies on me.
Stack
Podfile
Error
The text was updated successfully, but these errors were encountered: