CocoaPods Plugins

9d2ea021919ff81e02d48530aae191bd?s=47 Boris Bügling
September 19, 2014

CocoaPods Plugins

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

9d2ea021919ff81e02d48530aae191bd?s=128

Boris Bügling

September 19, 2014
Tweet

Transcript

  1. 3.

    COCOAPODS PLUGINS ▸ Add subcommands to pod, the tool ▸

    post_install hook ▸ Each plugin is a Gem
  2. 13.

    $ 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. 14.

    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
  4. 15.