Skip to content

Instantly share code, notes, and snippets.

@fabiopelosin
Last active December 17, 2015 09:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabiopelosin/5585117 to your computer and use it in GitHub Desktop.
Save fabiopelosin/5585117 to your computer and use it in GitHub Desktop.
CocoaPods communication.

CocoaPods: YAML Specifications

Since version 0.17 CocoaPods support the YAML format for specifications. The YAML format is similar to the Ruby DSL with some minor adaptations.

To convert the Master repo we need your help to ensure that the transition is smooth. Please follow the below presented steps to help us identify any issue.

Testing

To test the changes you need to use the experimental yaml_podspecs branch.

$ cd ~/.cocoapods/master
$ git checkout origin/yaml_podspecs -b yaml_podspecs

Now that you are using the experimental branch you can test with a project integrated with CocoaPods that an installation succeeds. Please test also that the project builds as there should be no changes introduced by the experimental brach.

$ cd project_path
$ pod install

Finally, don't forget to checkout the master branch in the master repo otherwise you will miss any update.

$ cd ~/.cocoapods/master
$ git checkout master
$ rm -rf ~/.cocoapods/master/Specs
@orta
Copy link

orta commented May 15, 2013

Incase people are interested why we're moving to a YAML based spec version, at its simplest we want to make it so that cocoapods does not run code downloaded from the specs repo on your computer. Instead it will work with a serialised format that requires no evaling.

@fabiopelosin
Copy link
Author

Other benefits are:

  • The YAML format allows to use the specs in non Ruby environments (as Objective-C)
  • As we can now serialize specs it is possible to bulk edit the master repo or to derive specs from targets of Xcode projects.

@fabiopelosin
Copy link
Author

For those interested in inspecting it the branch is available here. An example spec can be found here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment