How to use CocoaPods plugins

CocoaPods + Plugins

CocoaPods is a community project run by very few maintainers with a massive surface area to maintain. It's safe to say that CocoaPods could never support every feature that Xcode supports, and even then the team has to say "no" to a lot of potentially useful features.

Rather than let that be the end of the discussion, back in 2013 CocoaPods added support for CocoaPods Plugins. The plugin architecture allowed others to extend CocoaPods to support features that don't fit the main goal of dependency management and eco-system growth.

What can CocoaPods Plugins do?

A CocoaPods Plugin can:

  • Hook into the install process, both before and after
  • Add new commands to pod
  • Do whatever they want, because Ruby is a very dynamic language

This means the scope of a plugin is generally related to adding features to your build process, but can really do anything you want. For example cocoapods-roulette generates a new iOS app with three random Pods. We keep a relatively curated list of all plugins, you can see them at the end of this article.

How do I install a plugin

You will want to use a Gemfile, if you've never used a Gemfile before or want a refresher - check out our guide "Using a Gemfile". All CocoaPods Plugins are Gems, and they are installed by first adding them to the Gemfile, then you need to mention that they exist inside your Podfile.

For example, to use cocoapods-repo-update - you need to amend your Gemfile:

  source 'https://rubygems.org'

  gem 'cocoapods'
+ gem 'cocoapods-repo-update'
  gem 'fastlane'

Then add a reference to it in your Podfile:

  platform :ios, '9.0'
+ plugin 'cocoapods-repo-update'

  use_frameworks!

  # OWS Pods
  pod 'SignalCoreKit', git: 'https://github.com/signalapp/SignalCoreKit.git', testspecs: ["Tests"]

Running bundle exec pod install will then have the cocoapods-repo-update plugin executed also.

What Plugins Exist?

There's quite a few! If you have some more to add, send us a PR to this JSON file

AppleDoc

Generates docset and documentation for a pod.

Check Latest

Checks if the latest version of a pod is up to date.

CocoaPods Acknowledgements

CocoaPods plugin that generates an acknowledgements plist to make it easy to create tools to use in apps.

CocoaPods Archive

A CocoaPods plugin that enables you to archive your Pod as a static library

CocoaPods Artifactory Plugin

Enables usage of Artifactory as an index for CocoaPods repo and as a repository for pods.

CocoaPods Blacklist

Check if a project is using a banned version of a pod. Handy for security audits.

CocoaPods Check

Displays differences between locked and installed Pods

CocoaPods Debug

A simple plugin to ease debugging CocoaPods.

CocoaPods Foundation Headers

A CocoaPods plugin for using Foundation instead of UIKit/Cocoa in generated headers

CocoaPods Generator

Add files to empty target from *.podspec, such as souce files, libraries, frameworks, resources and so on.

CocoaPods Githooks

A CocoaPods plugin that syncs git hooks between team members

CocoaPods Integrate Flutter

A plugin to integrate flutter with existing iOS application.

CocoaPods Keys

Store sensitive data in your Mac's keychain, that will be installed into your app's source code via the Pods library.

CocoaPods Links

A CocoaPods plugin to manage local development pods

CocoaPods Mangle

Mangling your dependencies symbols allows more than one copy of a dependency to exist without errors. This plugin mangles your dependencies to make this possible.

CocoaPods Mix Frameworks

Mix use_framework! targets with static targets through a surrogate Framework target.

CocoaPods Packager

Generate a framework or static library from a podspec.

CocoaPods Prune Localizations

Upon running pod install, this plugin will remove unused localizations by your project

CocoaPods Repo Update

cocoapods-repo-update is a CocoaPods plugin that checks your dependencies when you run `pod install` and updates the local specs repositories if needed.

CocoaPods Templates

CocoaPods plugin to install Xcode templates from a remote source

CocoaPods Thumbs

Use cocoapods-thumbs to check upvotes or downvotes of Podspecs from your peers based on past experiences.

CocoaPods Update If You Dare

update ... if you dare (warns users before updating all pods at once)

CocoaPods Uploader

Upload file/dir to remote storage.

Deploy

Deploys dependencies for a CocoaPods project without needing to clone the repo (Similar to Bundler's `--deployment`).

Pod Dependencies

Shows a project's CocoaPod dependency graph.

Pod browser

Open a pod's homepage in the browser.

Pod docs

Convenient access to the documentation of a Pod via cocoadocs.org.

Pod info

Shows information on installed Pods.

Pod watch

Watch for Podfile changes and run pod install.

Pods Roulette

Builds an empty project with three random pods.

Release

Tags and releases pods for you.

Rome

Rome makes it easy to build a list of frameworks for consumption outside of Xcode, e.g. for a Swift script.

Sorted Search

Adds a sort subcommand for pod search to sort search results by amount of stars, forks, or github activity.

docstats

Showing documentation metrics of Pods.

open

Open a pod’s workspace.

repo-hg

Adds mercurial support to manage spec-repositories.

repo-svn

Adds subversion support to manage spec-repositories.