Command-line Reference

Commands

pod []

CocoaPods, the Objective-C library package manager.

Installation

The commands listed in this group provide support for installing and integrating the dependecies specified in a Podfile.

Following is presented the basic workflow for integrating CocoaPods in a user project.

$ touch Podfile
$ vim Podfile
$ pod install
$ open *.xcworkspace
$ vim podfile
$ pod install
$ pod outdated
$ pod update

Commands

pod init

pod install

pod update

pod outdated

pod init

pod init [#]

Creates a Podfile for the current directory if none currently exists. If an XCODEPROJ project file is specified or if there is only a single project file in the current directory, targets will be automatically generated based on targets defined in the project.

It is possible to specify a list of dependencies which will be used by the template in the Podfile.default (normal targets) Podfile.test (test targets) files which should be stored in the ~/.cocoapods/templates folder.

Inherited options:

--silent

Show nothing.

--completion-script

Print the auto-completion script.

--version

Show the version of the tool.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod install

pod install []

Downloads all dependencies defined in Podfile and creates an Xcode Pods library project in ./Pods.

The Xcode project file should be specified in your Podfile like this:

xcodeproj `path/to/XcodeProject`

If no xcodeproj is specified, then a search for an Xcode project will be made. If more than one Xcode project is found, the command will raise an error.

This will configure the project to reference the Pods static library, add a build configuration file, and add a post build script to copy Pod resources.

Options:

--project-directory=/project/dir/

The path to the root of the project directory.

--no-clean

Leave SCM dirs like .git and .svn intact after downloading.

--no-integrate

Skip integration of the Pods libraries in the Xcode project(s).

--no-repo-update

Skip running pod repo update before install.

Inherited options:

--silent

Show nothing.

--completion-script

Print the auto-completion script.

--version

Show the version of the tool.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod update

pod update [#]

Updates the Pods identified by the specified POD_NAMES. If no POD_NAMES are specified it updates all the Pods ignoring the contents of the Podfile.lock. This command is reserved to the update of dependencies and pod install should be used to install changes to the Podfile.

Options:

--project-directory=/project/dir/

The path to the root of the project directory.

--no-clean

Leave SCM dirs like .git and .svn intact after downloading.

--no-integrate

Skip integration of the Pods libraries in the Xcode project(s).

--no-repo-update

Skip running pod repo update before install.

Inherited options:

--silent

Show nothing.

--completion-script

Print the auto-completion script.

--version

Show the version of the tool.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod outdated

pod outdated []

Shows the outdated pods in the current Podfile.lock, but only those from spec repos, not those from local/external sources or :head versions.

Options:

--no-repo-update

Skip running pod repo update before install.

--project-directory=/project/dir/

The path to the root of the project directory.

Inherited options:

--silent

Show nothing.

--completion-script

Print the auto-completion script.

--version

Show the version of the tool.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod list

pod list []

Lists all available pods.

Options:

--update

Run pod repo update before listing.

Inherited options:

--silent

Show nothing.

--completion-script

Print the auto-completion script.

--version

Show the version of the tool.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod list new

pod list new []

Lists pods introduced in the master spec-repo since the last check

Inherited options:

--update

Run pod repo update before listing.

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod spec create

pod spec create [#]

Creates a PodSpec, in the current working dir, called NAME.podspec. If a GitHub url is passed the spec is prepopulated.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod spec lint

pod spec lint [#]

Validates NAME.podspec. If a DIRECTORY is provided, it validates the podspec files found, including subfolders. In case the argument is omitted, it defaults to the current working dir.

Options:

--quick

Lint skips checks that would require to download and build the spec.

--allow-warnings

Lint validates even if warnings are present.

--subspec=NAME

Lint validates only the given subspec.

--no-subspecs

Lint skips validation of subspecs.

--no-clean

Lint leaves the build directory intact for inspection.

--sources=https://github.com/artsy/Specs

The sources from which to pull dependant pods (defaults to https://github.com/CocoaPods/Specs.git). Multiple sources must be comma-delimited..

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod spec cat

pod spec cat [#]

Prints the content of the podspec(s) whose name matches QUERY to standard output.

Options:

--regex

Interpret the QUERY as a regular expression.

--show-all

Pick from all versions of the given podspec.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod spec which

pod spec which [#]

Prints the path of the .podspec file(s) whose name matches QUERY

Options:

--regex

Interpret the QUERY as a regular expression.

--show-all

Print all versions of the given podspec.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod spec edit

pod spec edit [#]

Opens the podspec matching QUERY to be edited.

Options:

--regex

Interpret the QUERY as a regular expression.

--show-all

Pick from all versions of the given podspec.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod repo add

pod repo add [#, #, #]

Clones URL in the local spec-repos directory at ~/.cocoapods/repos/. The remote can later be referred to by NAME.

Options:

--shallow

Create a shallow clone (fast clone, but no push capabilities).

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod repo update

pod repo update [#]

Updates the local clone of the spec-repo NAME. If NAME is omitted this will update all spec-repos in ~/.cocoapods/repos.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod repo lint

pod repo lint [#]

Lints the spec-repo NAME. If a directory is provided it is assumed to be the root of a repo. Finally, if NAME is not provided this will lint all the spec-repos known to CocoaPods.

Options:

--only-errors

Lint presents only the errors.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod repo list

pod repo list []

List the repos from the local spec-repos directory at ~/.cocoapods/repos/.

Options:

--count-only

Show the total number of repos.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod repo remove

pod repo remove [#]

Deletes the remote named NAME from the local spec-repos directory at ~/.cocoapods/repos/.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod repo push

pod repo push [#, #]

Validates NAME.podspec or *.podspec in the current working dir, creates a directory and version folder for the pod in the local copy of REPO (~/.cocoapods/repos/[REPO]), copies the podspec file into the version directory, and finally it pushes REPO to its remote.

Options:

--allow-warnings

Allows pushing even if there are warnings.

--local-only

Does not perform the step of pushing REPO to its remote.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod setup

pod setup []

Creates a directory at ~/.cocoapods/repos which will hold your spec-repos. This is where it will create a clone of the public master spec-repo from:

https://github.com/CocoaPods/Specs

If the clone already exists, it will ensure that it is up-to-date.

Options:

--no-shallow

Clone full history so push will work.

Inherited options:

--silent

Show nothing.

--completion-script

Print the auto-completion script.

--version

Show the version of the tool.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod lib create

pod lib create [#, #]

Creates a scaffold for the development of a new Pod named NAME according to the CocoaPods best practices. If a TEMPLATE_URL, pointing to a git repo containing a compatible template, is specified, it will be used in place of the default one.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod lib lint

pod lib lint []

Validates the Pod using the files in the working directory.

Options:

--quick

Lint skips checks that would require to download and build the spec.

--allow-warnings

Lint validates even if warnings are present.

--subspec=NAME

Lint validates only the given subspec.

--no-subspecs

Lint skips validation of subspecs.

--no-clean

Lint leaves the build directory intact for inspection.

--sources=https://github.com/artsy/Specs

The sources from which to pull dependant pods (defaults to https://github.com/CocoaPods/Specs.git). Multiple sources must be comma-delimited..

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod ipc repl

pod ipc repl []

The repl listens to commands on standard input and prints their result to standard output.

It accepts all the other ipc subcommands. The repl will signal the end of output with the the ASCII CR+LF \n\r.

Options:

--project-directory=/project/dir/

The path to the root of the project directory.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod ipc spec

pod ipc spec [#]

Converts a podspec to JSON and prints it to STDOUT.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod ipc podfile

pod ipc podfile [#]

Converts a Podfile to YAML and prints it to STDOUT.

Options:

--project-directory=/project/dir/

The path to the root of the project directory.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod ipc list

pod ipc list []

Prints to STDOUT a YAML dictionary where the keys are the name of the specifications and each corresponding value is a dictionary with the following keys:

  • defined_in_file
  • version
  • authors
  • summary
  • description
  • platforms

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod ipc update-search-index

pod ipc update-search-index []

Updates the search index and prints its path to standard output. The search index is a YAML encoded dictionary where the keys are the names of the Pods and the values are a dictionary containing the following information:

  • version
  • summary
  • description
  • authors

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.