CocoaPods Plugins

Boris Bügling
September 19, 2014

CocoaPods Plugins

Lightning talk on useful CocoaPods plugins and how to build your own, given at NSSpain 2014.

Boris Bügling

September 19, 2014

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

17 slides
  1. COCOAPODS PLUGINS ▸ Add subcommands to pod, the tool ▸

    post_install hook ▸ Each plugin is a Gem
  2. $ tree . !"" Gemfile !"" LICENSE.txt !"" README.md !""

    Rakefile !"" cocoapods_awesome_plugin.gemspec #"" lib !"" cocoapods_awesome_plugin.rb !"" cocoapods_plugin.rb #"" pod #"" command #"" plugin.rb 3 directories, 8 files
  3. module Pod class Command class Plugin < Command self.summary =

    "Short description." self.arguments = [CLAide::Argument.new('NAME', true)] def initialize(argv) @name = argv.shift_argument super end def validate! super help! "A Pod name is required." unless @name end def run UI.puts "Add your implementation here" end

More Decks by Boris Bügling

Other Decks in Technology