CINXE.COM

CocoaPods Guides - Setting up for Development

<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>CocoaPods Guides - Setting up for Development</title> <link rel="shortcut icon" href="https://cocoapods.org/favicons/favicon.ico" type="image/x-icon"> <link rel="apple-touch-icon" href="https://cocoapods.org/favicons/apple-touch-icon.png"> <link rel="apple-touch-icon" sizes="57x57" href="https://cocoapods.org/favicons/apple-touch-icon-57x57.png"> <link rel="apple-touch-icon" sizes="60x60" href="https://cocoapods.org/favicons/apple-touch-icon-60x60.png"> <link rel="apple-touch-icon" sizes="72x72" href="https://cocoapods.org/favicons/apple-touch-icon-72x72.png"> <link rel="apple-touch-icon" sizes="76x76" href="https://cocoapods.org/favicons/apple-touch-icon-76x76.png"> <link rel="apple-touch-icon" sizes="114x114" href="https://cocoapods.org/favicons/apple-touch-icon-114x114.png"> <link rel="apple-touch-icon" sizes="120x120" href="https://cocoapods.org/favicons/apple-touch-icon-120x120.png"> <link rel="apple-touch-icon" sizes="144x144" href="https://cocoapods.org/favicons/apple-touch-icon-144x144.png"> <link rel="apple-touch-icon" sizes="152x152" href="https://cocoapods.org/favicons/apple-touch-icon-152x152.png"> <meta charset="utf-8"> <meta content="cocoapods objective-c objc swift package manager libraries documentation search pods podspec podfile cocoa apple ios library" name="keywords"> <meta content="IE=edge" http-equiv="X-UA-Compatible"> <meta content="width=device-width, initial-scale=1.0" name="viewport"> <meta content="The Dependency Manager for iOS &amp; Mac projects" name="description"> <meta content="CocoaPods Dev Team" name="author"> <meta content="summary" name="twitter:card"> <meta content="@CocoaPods" name="twitter:site"> <meta content="@CocoaPods" name="twitter:creator"> <meta content="CocoaPods.org" name="twitter:title"> <meta content="The Dependency Manager for iOS &amp; Mac projects." name="twitter:description"> <meta content="https://www.cocoapods.org/" name="twitter:url"> <link href="../stylesheets/app.css" rel="stylesheet"> <script src="../javascripts/application.js"></script><meta content="CocoaPods Guides" name="twitter:title"> <meta content="The official documentation site for the CocoaPods dependency manager." name="twitter:description"> <meta content="CocoaPods Guides" property="og:site_name"> <meta content="CocoaPods Guides" property="og:title"> <meta content="https://guides.cocoapods.org" property="og:url"> </head> <body> <nav class="navbar navbar-static-top" role="navigation"><section class="container"><div class="navbar-header"> <button class="navbar-toggle" data-target=".navbar-header-collapse" data-toggle="collapse" type="button"><span class="sr-only">Toggle navigation</span><span class="glyphicon glyphicon-plus"></span></button><a class="navbar-brand" href="https://cocoapods.org"></a> </div> <div class="collapse navbar-collapse navbar-header-collapse"><ul class="nav navbar-nav navbar-right"> <li><a href="https://cocoapods.org/about">About</a></li> <li class="active"><a href="https://guides.cocoapods.org">Guides</a></li> <li><a href="https://blog.cocoapods.org">Blog</a></li> </ul></div></section></nav><section class="container"><div class="row"><header class="header content col-md-10 col-md-offset-1 col-lg-10 col-lg-offset-1"><h1>Setting up for Development</h1></header></div></section><div class="guide" id="content-wrapper"><section class="container"><div class="row"><article class="content col-md-10 col-md-offset-1 col-lg-10 col-lg-offset-1"><p>CocoaPods is a collection of ruby gems. It is possible to clone them individually and set up a bundler environment for working in CocoaPods. However, for someone new to high-level library development in ruby this comes with a high learning curve.</p> <h3 id="working-on-cocoapods"> <a class="header-link" href="#working-on-cocoapods">&lt;</a>Working on CocoaPods</h3> <p>If you're not sure where your changes are going to be, you may way to look at the <a href="https://guides.cocoapods.org/contributing/components">Core Components</a> to get a sense of where the change will take place.</p> <p>Once in the correct gem you should verify that all specs pass and all examples build. ( See <code>rake -T</code> for other per-gem based tasks. )</p> <div class="highlight"> </div> <div class="code-break"> <section class="container"> <div class="row"> <article class="content col-md-11 col-md-offset-1"><pre class="highlight shell"><code><span class="nv">$ </span>rake spec <span class="nv">$ </span>rake examples:build </code></pre> </article> </div> </section> </div> <section class="container "> <div class="row"> <article class="content col-md-10 col-md-offset-1"> </article> </div> <p>Create your patch, verify all specs still pass and examples still build, and create a <a href="https://github.com/CocoaPods/CocoaPods/compare">pull request</a>.</p> <h3 id="using-latest-pod-command"> <a class="header-link" href="#using-latest-pod-command">&lt;</a>Using latest pod command</h3> <p>If you would like to run latest pod command in terminal for you project.</p> <blockquote> <p>You could run it with full path, i.e.</p> </blockquote> <div class="highlight"> </div> </section> <div class="code-break"> <section class="container"> <div class="row"> <article class="content col-md-11 col-md-offset-1"><pre class="highlight shell"><code>path/to/CocoaPods/CocoaPods/bin/pod <span class="nb">install</span> </code></pre> </article> </div> </section> </div> <section class="container "> <div class="row"> <article class="content col-md-10 col-md-offset-1"> </article> </div> <blockquote> <p>For convenience you could add the next alias to you .zshrc or .bashrc or similar:</p> </blockquote> <div class="highlight"> </div> </section> <div class="code-break"> <section class="container"> <div class="row"> <article class="content col-md-11 col-md-offset-1"><pre class="highlight shell"><code><span class="nb">alias </span>pod-dev<span class="o">=</span><span class="s1">'path/to/CocoaPods/CocoaPods/bin/pod'</span> </code></pre> </article> </div> </section> </div> <section class="container "> <div class="row"> <article class="content col-md-10 col-md-offset-1"> </article> </div> <p>Other advanced aliases:</p> <blockquote> <p>If you want to autoload <a href="https://github.com/pry/pry">Pry</a> and the <a href="https://github.com/awesome-print/awesome_print">Awesome Print</a> gems set the <code>COCOA_PODS_ENV</code> environment variable to <code>development</code>. This can be done with an alias like:</p> </blockquote> <div class="highlight"> </div> </section> <div class="code-break"> <section class="container"> <div class="row"> <article class="content col-md-11 col-md-offset-1"><pre class="highlight shell"><code><span class="nb">alias </span>pod-dev<span class="o">=</span><span class="s1">'COCOA_PODS_ENV=development path/to/CocoaPods/CocoaPods/bin/pod'</span> </code></pre> </article> </div> </section> </div> <section class="container "> <div class="row"> <article class="content col-md-10 col-md-offset-1"> </article> </div></section></article></div></section></div> <div class="info-row"><section class="container"><div class="row"><article class="content col-md-10 col-md-offset-1 col-lg-10 col-lg-offset-1"><a data-container="body" data-content="CocoaPods is an open source project. Help us improve these guides by sending a pull request. ❤" data-original-title="" data-placement="top" data-toggle="popover" data-trigger="hover" href="https://github.com/CocoaPods/guides.cocoapods.org/blob/master/source/contributing/dev-environment.html.md" id="pull-request" title=""></a><ul class="breadcrumb"> <li> <a href="../index.html">Home</a><span class="divider"></span> </li> <li> <a href="index.html">Contributing</a><span class="divider"></span> </li> <li class="active">Setting up for Development</li> </ul></article></div></section></div> <section class="site_navigation container"><div class="row"> <div class="col-lg-3 col-sm-3 col-xs-6 footer-index"> <h3><a href="../using/index.html">Using CocoaPods</a></h3> <ul> <li><a href="../using/getting-started.html">Getting Started</a></li> <li><a href="../using/using-cocoapods.html">Using CocoaPods</a></li> <li><a href="../using/pod-install-vs-update.html">pod install vs. pod update</a></li> <li><a href="../using/the-podfile.html">The Podfile</a></li> <li><a href="../using/troubleshooting.html">Troubleshooting</a></li> <li><a href="../using/faq.html">F.A.Q</a></li> <li><a href="../using/test-specs.html">Testing with CocoaPods</a></li> <li><a href="../using/a-gemfile.html">Using a Gemfile</a></li> </ul> </div> <div class="col-lg-3 col-sm-3 col-xs-6 footer-index"> <h3><a href="../making/index.html">Build with CocoaPods</a></h3> <ul> <li><a href="../making/making-a-cocoapod.html">Making a CocoaPod</a></li> <li><a href="../making/using-pod-lib-create.html">Using Pod Lib Create</a></li> <li><a href="../making/getting-setup-with-trunk.html">Getting setup with Trunk</a></li> <li><a href="../making/development-cocoapods.html">Development Pods</a></li> <li><a href="../making/private-cocoapods.html">Private Pods</a></li> <li><a href="../making/specs-and-specs-repo.html">Specs and the Specs Repo</a></li> </ul> </div> <div class="clearfix visible-xs"></div> <div class="col-lg-3 col-sm-3 col-xs-6 footer-index"> <h3><a href="../plugins/index.html">Plugins</a></h3> <ul> <li><a href="../plugins/setting-up-plugins.html">How to use CocoaPods plugins</a></li> <li><a href="../plugins/environment-vars.html">Keeping Secrets</a></li> <li><a href="../plugins/optimising-ci-times.html">Optimise CI</a></li> <li><a href="../plugins/pre-compiling-dependencies.html">Pre-compiling dependencies</a></li> <li><a href="../plugins/using-pods-for-closed-source-libs.html">Packaging Closed Source SDKs</a></li> </ul> </div> <div class="col-lg-3 col-sm-3 col-xs-6 footer-index"> <h3><a href="index.html">Contributing</a></h3> <ul> <li><a href="contribute-to-cocoapods.html">How to Contribute</a></li> <li><a href="components.html">Core Components</a></li> <li><a href="dev-environment.html">Setting up for Development</a></li> <li><a href="release-process.html">Release Process</a></li> <li><a href="tickets-handling.html">Ticket handling</a></li> </ul> </div> <div class="clearfix visible-xs"></div> <div class="clearfix"></div> <div class="col-xs-12 footer-index"> <h3> <a href="/reference.html">Reference</a> </h3> <ul> <li class="col-lg-3 col-sm-3 col-xs-6"><a href="/syntax/podfile.html">Podfile Syntax</a></li> <li class="col-lg-3 col-sm-3 col-xs-6"><a href="/syntax/podspec.html">Podspec Syntax</a></li> <li class="col-lg-3 col-sm-3 col-xs-6"><a href="/terminal/commands.html">Command-line Reference</a></li> </ul> </div> </div></section><footer class="page-footer"><section class="container"><div class="row"><article class="col-md-8 col-lg-8 col-sm-12 col-md-offset-2 col-lg-offset-2 col-xs-12"><h4>CocoaPods is a project from</h4> <p class="contributors"> <a href="https://twitter.com/dnkoutso">Dimitris Koutsogiorgas</a>, <a href="https://dani.builds.terrible.systems/">Danielle Lancashire</a>, <a href="https://github.com/amorde">Eric Amorde</a>, <a href="https://orta.io">Orta Therox</a>, <a href="https://github.com/paulb777">Paul Beusterien</a>, <a href="https://segiddins.me">Samuel Giddins</a>, and <a href="https://cocoapods.org/about#team">The CocoaPods Dev Team</a> with contributions from <a href="https://github.com/CocoaPods/Specs/graphs/contributors">many, many others</a>.</p> <h4>Lovingly sponsored by</h4> <p class="sponsors"><a href="http://artsy.net">Artsy</a>, <a href="http://www.usebutton.com">Button</a>, <a href="http://www.capitalone.io">Capital One</a>, <a href="https://circleci.com">CircleCI</a>, <a href="http://discontinuity.eu">Discontinuity</a>, <a href="https://www.emergetools.com">Emerge Tools</a>, <a href="http://www.fngtps.com">Fingertips</a>, <a href="https://developers.google.com">Google</a>, <a href="https://www.heroku.com">Heroku</a>, <a href="https://www.jsdelivr.com">jsDelivr</a>, <a href="https://realm.io">Realm</a>, <a href="https://pspdfkit.com/">PSPDFKit</a>, <a href="http://www.rubymotion.com">RubyMotion</a>, <a href="https://www.sauspiel.de">Sauspiel</a>, <a href="https://www.slack.com">Slack</a>, <a href="https://www.soundcloud.com">SoundCloud</a>, <a href="https://www.stripe.com">Stripe</a>, <a href="https://www.squareup.com">Square</a>, and <a href="http://www.technologyastronauts.ch">Technology Astronauts</a>.</p></article></div></section></footer><footer class="footer-links"><section class="container"><div class="row"><article class="col-md-8 col-lg-8 col-sm-12 col-md-offset-2 col-lg-offset-2 col-xs-12"><a class="cocoapods-small-logo" href="https://cocoapods.org"></a><ul> <li class="col-md-3 col-sm-3 col-xs-6"><a href="https://guides.cocoapods.org/using/troubleshooting.html">Support</a></li> <li class="col-md-3 col-sm-3 col-xs-6"><a href="https://github.com/CocoaPods/CocoaPods">GitHub Repo</a></li> <li class="col-md-3 col-sm-3 col-xs-6"><a href="https://status.cocoapods.org">Web Properties Status</a></li> <li class="col-md-3 col-sm-3 col-xs-6"><a href="https://twitter.com/CocoaPods">@CocoaPods</a></li> <li class="col-md-3 col-sm-3 col-xs-6"><a href="http://groups.google.com/group/cocoapods">Mailing List</a></li> <li class="col-md-3 col-sm-3 col-xs-6"><a href="https://cocoapods.org/about"><span class="visible-lg-span">CocoaPods</span> Dev Team</a></li> <li class="col-md-3 col-sm-3 col-xs-6"><a href="https://guides.cocoapods.org/syntax/podfile.html">Podfile Doc<span class="hidden-lg-span">s</span><span class="visible-lg-span">umentation</span></a></li> <li class="col-md-3 col-sm-3 col-xs-6"><a href="https://cocoapods.org/legal">Legal / Conduct</a></li> </ul></article></div></section></footer> </body> <script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-29866548-4', 'cocoapods.org'); ga('send', 'pageview');</script> </html>

Pages: 1 2 3 4 5 6 7 8 9 10