CINXE.COM

CocoaPods.org

<!DOCTYPE html><html lang="en-en"><head><title>CocoaPods.org</title><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 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" /><script src="/javascripts/application-5ed418c20d95511291d9a914c4e45151.js"></script><link href="/stylesheets/app-5ed418c20d95511291d9a914c4e45151.css" media="screen" rel="stylesheet" type="text/css" /><link href="https://cocoapods.org/opensearch.xml" rel="search" title="CocoaPods" type="application/opensearchdescription+xml" /></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><a href="https://guides.cocoapods.org">Guides</a></li><li><a href="https://blog.cocoapods.org">Blog</a></li></ul></div></section></nav><script id="search_result" type="text/html"><li class="result"><div class="infos col-sm-8 col-xs-12"><h3>{{#deprecated}}<span class="deprecated">{{{ _highlightResult.name.value }}}</span><span class="deprecated version">{{{ version }}}</span>{{/deprecated}}{{^deprecated}}<a href="{{link}}">{{{ _highlightResult.name.value }}}</a><span class="version">{{{ version }}}</span>{{/deprecated}}</h3>{{#deprecated}}<p>{{ name }} has been deprecated {{#deprecated_in_favor_of}}in favor of <a href="{{ deprecated_in_favor_of_link }}">{{ deprecated_in_favor_of }}</a>{{/deprecated_in_favor_of}}</p>{{/deprecated}}{{^deprecated}}<p>{{{ _highlightResult.summary.value }}}</p>{{/deprecated}}</div><div class="actions col-sm-4 col-xs-12"><div class="action-wrapper"><a href="{{ podspec }}">Podspec</a><a href="{{ site_link }}">Site</a></div></div></li></script><script id="expandable_search_result" type="text/html"><li class="result expandable" data-deprecated="{{deprecated}}" data-pod-name="{{name}}"><div class="expanded"><div class="content"></div></div><div class="infos col-sm-9 col-xs-12"><div class="compressed"><h3>{{#deprecated}}<span class="deprecated">{{{ _highlightResult.name.value }}}</span><span class="deprecated version">{{{ version }}}</span>{{/deprecated}}{{^deprecated}}<a href="{{ site_link }}">{{{ _highlightResult.name.value }}}</a><span class="version">{{{ version }}}</span>{{/deprecated}}</h3>{{#deprecated}}<p>{{ name }} has been deprecated {{#deprecated_in_favor_of}}in favor of <a href="{{ deprecated_in_favor_of_link }}">{{ deprecated_in_favor_of }}</a>{{/deprecated_in_favor_of}}</p>{{/deprecated}}{{^deprecated}}<p>{{{ _highlightResult.name.value }}}</p>{{/deprecated}}</div></div><div class="actions col-sm-3 col-xs-12"><div class="action-wrapper"><a href="{{ podspec }}">Podspec</a><a href="#">Expand</a></div></div></li></script><script src="https://cdn.jsdelivr.net/algoliasearch/3/algoliasearch.min.js"></script><script src="https://cdn.jsdelivr.net/npm/pure-md5@0.1.13"></script><div class="container" id="search_container"><section class="row"><div class="col-xs-12" id="search"><form onkeypress="return event.keyCode != 13;"><fieldset><input autocomplete="off" autofocus="" class="query" id="pod_search" placeholder="SEARCH*" type="search" /><span class="amount"></span><span id="search_loupe"></span><p>* Type here to search by name, author and summary.</p></fieldset></form></div></section></div><div id="results_container"><div id="search_results"><div class="selection"><div class="container to-edges"><section class="row"></section><div class="col-lg-102 col-sm-12 col-xs-10 col-sm-offset-0 col-xs-offset-1"><div class="platform"><input checked="" id="platform_either" name="platform" type="radio" value="" /><label class="left" for="platform_either"><span>Any</span></label><input id="platform_ios" name="platform" type="radio" value="on:ios" /><label class="middle" for="platform_ios"><span>iOS</span></label><input id="platform_osx" name="platform" type="radio" value="on:osx" /><label class="middle" for="platform_osx"><span>macOS</span></label><input id="platform_watchos" name="platform" type="radio" value="on:watchos" /><label class="middle" for="platform_watchos"><span>watchOS</span></label><input id="platform_tvos" name="platform" type="radio" value="on:tvos" /><label class="right" for="platform_tvos"><span>tvOS</span></label></div><div class="language"><input checked="" id="language_all" name="language" type="radio" value="" /><label class="left" for="language_all"><span>All</span></label><input id="language_swift" name="language" type="radio" value="lang:swift" /><label class="middle" for="language_swift"><span>Swift</span></label><input id="platform_objc" name="language" type="radio" value="lang:objc" /><label class="right" for="platform_objc"><span>Obj-C</span></label></div><div class="sorting dropdown">Sort by:<a aria-expanded="false" aria-haspopup="true" data-sorting="quality" data-target="#" data-toggle="dropdown" role="button">Quality <span class="caret"></a><ul aria-labelledby="dLabel" class="dropdown-menu" role="menu"><li><a class="selected" data-sorting="quality">Quality</a></li><li><a data-sorting="popularity">Popularity</a></li><li><a data-sorting="name">A-Z</a></li><li><a data-sorting="contributors">Contributors</a></li><li><a data-sorting="forks">Forks</a></li><li><a data-sorting="stars">Stars</a></li><li><a data-sorting="watchers">Watchers</a></li></ul></div></div></div></div><div class="container"><section class="row"><div class="col-lg-12 col-sm-12 col-xs-10 col-sm-offset-0 col-xs-offset-1"><div class="allocations"><p class="result_info" style="display:none"><span class="amount"></span> results.</p><ol class="shown"></ol><ol class="more" style="display:none"><li>load more</li></ol><ol class="onrequest"></ol></div></div><div class="col-lg-12 col-sm-12 col-xs-10 col-sm-offset-0 col-xs-offset-1"><div class="results"></div><div class="no_results" style="display:none"><div class="apology">Sorry. No pods found.</div><div class="splits"></div><div class="tags"></div><div class="tips">Some suggestions: Make sure that all words are spelled correctly. Try different keywords. Try more general keywords. Split long words into pieces.</div></div></div></section></div></div></div><div id="content-wrapper"><div class="homepage_container container"><section class="row"><div class="col-md-8 col-lg-8 col-sm-8 col-md-offset-2 col-lg-offset-2 col-sm-offset-2 intro"><h3 class="underlined">What is CocoaPods</h3><div class="header-horizontal-divider"><div class="index-arrow-down"></div><div class="index-enclosed-arrow-down"></div></div><p>CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. It has over 103 thousand libraries and is used in over 3 million apps. CocoaPods can help you scale your projects elegantly.</p></div></section><section class="row"><div class="col-md-8 col-lg-8 col-sm-8 col-md-offset-2 col-lg-offset-2 col-sm-offset-2"><ul class="nav nav-tabs underscore"><li class="active"><a data-toggle="tab" href="#install">Install</a></li><li><a data-toggle="tab" href="#get_started">Get Started</a></li><li><a data-toggle="tab" href="#create_a_pod">Create a Pod</a></li></ul><div id="homepage-tab-indicator" class="index-horizontal-divider"><div class="index-arrow-down"></div><div class="index-enclosed-arrow-down"></div></div><div class="tab-content"><div class="tab-pane fade in active" id="install"><p>CocoaPods is built with Ruby and is installable with the default Ruby available on macOS. We recommend you use the default ruby.</p> <p>Using the default Ruby install can require you to use <code>sudo</code> when installing gems. Further installation instructions are in <a href="https://guides.cocoapods.org/using/getting-started.html#getting-started">the guides</a>.</p> <pre class="highlight"> $ sudo gem install cocoapods </pre> </div><div class="tab-pane fade" id="get_started"><p>Search for pods (above). Then list the dependencies in a text file named <code>Podfile</code> in your Xcode project directory:</p> <pre class="highlight"> platform :ios, '8.0' use_frameworks! target 'MyApp' do pod 'AFNetworking', '~> 2.6' pod 'ORStackView', '~> 3.0' pod 'SwiftyJSON', '~> 2.3' end </pre> <p><small>Tip: CocoaPods provides a <code>pod init</code> command to create a Podfile with smart defaults. You should use it.</small></p> <p>Now you can install the dependencies in your project:</p> <pre class="highlight"> $ pod install </pre> <p>Make sure to always open the Xcode workspace instead of the project file when building your project:</p> <pre class="highlight"> $ open App.xcworkspace </pre> <p>Now you can import your dependencies e.g.:</p> <pre class="highlight"> #import &lt;Reachability/Reachability.h> </pre> </div><div class="tab-pane fade" id="create_a_pod"><p>Sometimes CocoaPods doesn鈥檛 yet have a pod for one of your dependencies. Fortunately, creating a pod is pretty easy: <pre class="highlight"> $ pod spec create Peanut $ edit Peanut.podspec $ pod spec lint Peanut.podspec </pre></p> <p>You can find a lot of information on the <a href="https://guides.cocoapods.org">process in the guides</a>. When you&#39;re done you can get an account and push your <a href="https://guides.cocoapods.org/making/getting-setup-with-trunk.html">pod to the CocoaPods Trunk</a>.</p> </div></div></div></section><section class="row"><div class="col-md-8 col-lg-8 col-sm-8 col-md-offset-2 col-lg-offset-2 col-sm-offset-2"><h3 class="underlined">Contribute</h3><div class="header-horizontal-divider"><div class="index-arrow-down"></div><div class="index-enclosed-arrow-down"></div></div><p>We鈥檙e developing CocoaPods on GitHub. There鈥檚 a guide for <a href="https://guides.cocoapods.org/contributing/contribute-to-cocoapods.html">getting started on the CocoaPods tool</a>. It鈥檚 easy and really gratifying to contribute patches! - for a lot of people it&#39;s their first foray into Open Source. We have some <a href="https://github.com/CocoaPods/CocoaPods/issues?q=is%3Aopen+is%3Aissue+label%3Ad1%3Aeasy">easy tickets to look at</a>.</p> </div></section></div></div><div class="clearfix"></div><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&nbsp;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></html>

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