Best way to enable a demo project with CocoaPod?

I am wondering what is the best way to enable a demo project with CocoaPod. In particular, I want it to be a component that anyone can try using the pod try command.

I see two options:

option 1: embedded project in examples / with podcast

Here Pod contains an embedded project that uses the Podfile to reference the container itself.

This is what the directory structure created with the pod lib create command and the CocoaPods documentation offer .

option 2: embedded project in Demo / using pod as a resource

Here, Pod contains an embedded project in which the Xcode project file uses a relative path to directly access resources from the module itself.

This is what I see in different examples in the wild, and this is what works in a Pod now. I'm author .

Since CocoaPods is still on the move, I wonder if one way is more blessed than another. Is the documentation suggesting option 1 obsolete? Or is the option supporting code 2 deprecated? Will they work with pod try in the future?

+7
cocoapods
source share
1 answer

See also this answer for a demo of the search heuristic .

The best solution is to look at the def pick_demo_project(dir) routine in the try-plugin source https://github.com/CocoaPods/cocoapods-try/blob/master/lib/pod/command/try.rb#L133 to see the actual choices demo.

0
source share

All Articles