Skip to content
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

Moving podspec to root #46

Closed
hackingotter opened this issue Apr 30, 2014 · 6 comments
Closed

Moving podspec to root #46

hackingotter opened this issue Apr 30, 2014 · 6 comments

Comments

@hackingotter
Copy link

I think the podspec should be moved to the root as at the moment including JBChartView from a local folder doesn't work correctly.

@terryworona
Copy link
Collaborator

Can you pleas elaborate? What do you mean by local folder? Copying it directly to your project? What doesn't work?

@hackingotter
Copy link
Author

I didn't copy it into my project, I used the cocopods feature to use a local copy of a pod.
pod "JBChartView", :path => "~/Documents/Pods/JBChartView" is how it should work according to the example on the cocoa pods website! but it doesn't as the podspec is stored I the classes folder.
If I append the path by "/Classes" the pod can be integrated, but cocoapods is not able to add links to the files in the pods project. Further there is an error as the license file is not stored in the classes folder and therefore cannot be found

@terryworona
Copy link
Collaborator

The "root" of the project is technically /Classes.

The demo project has no reason to be included, hence the reason the pod file is located where it is.

For your local copy, only include the JBBarChart_, JBLineChart_ and JBChart* .m/.h files + the podspec under /Documents/Pods/JBChartView. In other words, move everything from Pods/JBChartView/Classes down into /JBChartView and remove everything else.

@hackingotter
Copy link
Author

This should work, but the local copy actually is cloned from my fork. Moving the files will also affect any further commits and I don't want to have a different file arrangement in my fork than the one in the main repository as this would make pull requests and merging quite complicated.

I understand that classes is the technical root, but I think it's more common to place the podspec in the real root, not in the technical. Other projects like XLForm have a technical root, too, but they have the podspec in the root of their repositories and so far I had no problems with projects like that. And if you download them while pod integration you also only download the necessary files without any examples. The only source files that are downloaded are the ones in the "source_files" directory that can be set in the podspec. In your podspec this is set to "/Classes".
So for me it looks like the folder the podspec is stored in has no influence on the pod itself. In my opinion it only is important when you use local folders as I do.

So as far as I found out the podspec should be placed in the root of the repository to make it work with all features of cocoapods.

terryworona added a commit that referenced this issue May 1, 2014
@terryworona
Copy link
Collaborator

@hackingotter I moved the .podspec to the root of the project. Go ahead and try v2.4.2 (commit: b7927cd) and let me know if it works out for you.

@hackingotter
Copy link
Author

Everything works fine now. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants