Use Pod example apps to quickly try a Pod. #1568

alloy opened this Issue Nov 9, 2013 · 4 comments


None yet

4 participants

CocoaPods member

Most libraries have example apps, we should make it easy for CP users, but also current non-user to try these libs/examples through CP.

  • This needs a spec change to specify the example(s). Maybe it should just be a shell command that builds the app as needed, or opens the project in Xcode?
  • Add a command to the CLI to use this. E.g. pod try NAME ?
  • Or should this be a plugin? And if so, how do we deal with the spec change?
CocoaPods member

Nice idea. How I could see it working. Using ORStackView as an example. ( )

I do pod try ORStackView

It clones that to a temporary folder. Then CP / a plugin, looks for something like s.demo = "Project" if that fails it searches for the first xcproject. If it cannot find one it bails ( in an ideal world this would be a good time to turn it into an IRB like experience ) but if it does it performs pod install in the xcode directory and opens the new xcworkspace.

IMO this entire thing could be made without changes to the DSL, it'd be a bit less elegant though ( dealing with multiple xcodeprojects ) - not making DSL changes means that it could easily be handled outside of CP.

CocoaPods member

This is an awesome idea!

CocoaPods member

To be clear the purpose of this is to open the project used by the spec. This assumes that if a Podfile is found in the dir integration with CocoaPods is required. So we:

  1. checkout the source of the Pod in a temporary directory
  2. don't clean it
  3. perform pod install if needed
  4. open the workspace/project

This would make an excellent plugin. Could it be as simple as cloning an entire git repo to a temp folder, running any bootstrap commands and then opening the designated proj/workspace? Easier to implement off the bat, and would work right away with AFNetworking, RAC and others.

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