I noticed there's currently no command to revert a .podspec.json to a regular .podspec. I had a need for this command today when including a custom podspec in a forked repo.
Just to clarify, you do not actually need to use JSON specs anywhere other than the master specs repository, and trunk deals with this conversion. You can use the Ruby spec with CocoaPods.
You can already convert specs from Ruby DSL to JSON:
$ pod ipc spec --help
Usage:
$ pod ipc spec PATH
Converts a podspec to JSON and prints it to STDOUT.
$ pod ipc spec QueryKit.podspec
I don't think you understood the issue I was having. I needed to modify an
existing podspec that I could only find in the .json format. The forked
repo I was using didn't have a podspec in the root so I needed to convert
the .podspec.json file to a regular .podspec.
When pointing to a forked repo in my Podfile it looks for the .podspec.
Another solution would be to also allow the json format in this scenario.
Please reopen the issue, thank you!
On Wednesday, July 16, 2014, Kyle Fuller [email protected] wrote:
Closed #2313 https://github.com/CocoaPods/CocoaPods/issues/2313.
—
Reply to this email directly or view it on GitHub
https://github.com/CocoaPods/CocoaPods/issues/2313#event-142072490.
Sorry I did mis-understand this. You cannot convert a JSON spec into a Ruby spec.
Can you elaborate on what you was trying to do that required a Ruby spec? It's a bug if you are doing something in CocoaPods which requires a Ruby spec.
https://github.com/chrisballinger/ChatSecure-iOS/blob/3.0-push/Podfile#L31
So basically I made some changes to the UserVoice repo but, as you can see, the original repo didn't have a podspec in the root. Is there a way to specify in the Podfile to look for a .podspec.json instead of a .podspec in the repo?
Can you please reopen this issue?
You can either manually rewrite the pod spec using the Ruby DSL or make edits to the json pod spec
So if I make edits to the json podspec how do I utilize that directly from
a Podfile? Everything I tried looks for a .podspec in the root of a
repo and fails if it is in json format.
I'm not manually rewriting a json podspec into Ruby, that is kind of insane
and prone to error.
On Thursday, July 17, 2014, Samuel E. Giddins [email protected]
wrote:
You can either manually rewrite the pod spec using the Ruby DSL or make
edits to the json pod spec—
Reply to this email directly or view it on GitHub
https://github.com/CocoaPods/CocoaPods/issues/2313#issuecomment-49390206
.
@chrisballinger, I have changes for the next release of CocoaPods which fixes the underlying cause to this issue. That JSON specs are not supported when downloading pods from repositories directly.
Should be pushed up here over the weekend.
Awesome! :)
On Fri, Jul 18, 2014 at 12:38 AM, Kyle Fuller [email protected]
wrote:
@chrisballinger https://github.com/chrisballinger, I have changes for
the next release of CocoaPods which fixes the underlying cause to this
issue. That JSON specs are not supported when downloading pods from
repositories directly.Should be pushed up here over the weekend.
—
Reply to this email directly or view it on GitHub
https://github.com/CocoaPods/CocoaPods/issues/2313#issuecomment-49403579
.
$ pod ipc spec --help
Very useful to me, thx :+1:
So how to use after all podspec.json
with forked repo?
I want convert json fomat to podspec file too. Is there any solutions ?
Oh, it's old issue, may I need to manually edit the podspec file :(
I totally need this function...
I need podspec.json to podspec too...
I want convert json fomat to podspec file too. Is there any solutions ?
i also want to convert json fomat to podspec , did you solve that ?
I want convert json fomat to podspec file too. Is there any solutions ?
i also want to convert json fomat to podspec , did you solve that ?
Finally I found we dont need .podspec anyway,when use .podspec, just instead with .podspec.json
We use JFROG artifactory, which is an enterprise tool to host all our artifacts: gems, pods.
They don't support json podspecs, only ruby podspecs, and converting each spec is time consuming. Is there any plan to support this feature?
@joquerod no current plans and the issue is closed. A PR would be welcome.
i need convert .json to podspec too!!!!
Most helpful comment
I want convert json fomat to podspec file too. Is there any solutions ?