{"componentChunkName":"component---src-pages-author-author-yaml-id-js","path":"/author/thompson-sanjoto/","result":{"data":{"allMarkdownRemark":{"edges":[{"node":{"id":"c0caf239-e4c5-50f6-8471-43a4c9929f74","html":"<p>Cocoapod is a package dependency manager for Objective-C and Swift projects with XCode. Those Languages are used to make applications that run iOS, macOS, watchOS and tvOS. Cocoapods also acts as a coding hub to share your code with other people. That way we as a community of coders don’t have to “re-invent the wheel” to tackle problems that have already been solved.</p>\n<h4 id=\"installing-cocoapods\" style=\"position:relative;\"><a href=\"#installing-cocoapods\" aria-label=\"installing cocoapods permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Installing Cocoapods</h4>\n<p>Cocoapods is built on top of Ruby, so you would need to install that in your system before using Cocoapods.<br>\nThen, you can install using this command:<br>\n<code>sudo gem install cocoapods</code></p>\n<h4 id=\"using-cocoapods\" style=\"position:relative;\"><a href=\"#using-cocoapods\" aria-label=\"using cocoapods permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Using Cocoapods</h4>\n<p>Open Terminal and go to your XCode project directory.<br>\nAfterwards, run this command:<br>\n<code>pod init</code></p>\n<p>Then a Podfile is generated, configure the file, like so:  </p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\">platform :ios, &#39;8.0&#39;  </span>\n<span class=\"grvsc-line\">use_frameworks!  </span>\n<span class=\"grvsc-line\">target &#39;MyApp&#39; do  </span>\n<span class=\"grvsc-line\"> pod &#39;AFNetworking&#39;, &#39;~&gt; 2.6&#39;   pod &#39;ORStackView&#39;, &#39;~&gt; 3.0&#39;  </span>\n<span class=\"grvsc-line\"> pod &#39;SwiftyJSON&#39;, &#39;~&gt; 2.3&#39;</span>\n<span class=\"grvsc-line\">end</span></code></pre>\n<p>Where ‘MyApp’ is your application project and the ‘pod’ inside it are the libraries that you want to use! If you need to control which version of those libraries you can manipulate it on the right side of the config.</p>\n<h4 id=\"updating-cocoapods\" style=\"position:relative;\"><a href=\"#updating-cocoapods\" aria-label=\"updating cocoapods permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Updating Cocoapods</h4>\n<p>If you want to keep up to date with the codes shared in cocoapods you can run the command:<br>\n<code>pod update</code></p>\n<p>That way any latest bug fixes, enhancement and features on the new version will be downloaded!<br>\nTo see which Libraries that you want to utilize, head over to <a href=\"https://cocoapods.org/\">cocoapods</a> and search over there!</p>\n<h4 id=\"personal-favorites-pods\" style=\"position:relative;\"><a href=\"#personal-favorites-pods\" aria-label=\"personal favorites pods permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Personal favorites pods</h4>\n<p><a href=\"https://cocoapods.org/pods/Realm\">Realm</a> : For Managing Databases in iOS application</p>\n<p><a href=\"https://cocoapods.org/pods/Alamofire\">Alamofire</a> : For All of your Networking Needs</p>\n<p><a href=\"https://github.com/xmartlabs/Eureka\">Eureka</a> : For Simplified UI and Forms</p>\n<p>And of course our:<br>\n<a href=\"https://github.com/LoginRadius/ios-sdk\">LoginRadiusSDK</a> : For our API Calls to Manage your Login System</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n  .dark-default-dark {\n    background-color: #1E1E1E;\n    color: #D4D4D4;\n  }\n</style>","frontmatter":{"title":"Cocoapods : What It Is And How To Install?","author":{"id":"Thompson Sanjoto","github":null,"avatar":null},"date":"September 06, 2017","updated_date":null,"tags":["Swift","Objective-C","xcode"],"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.4184397163120568,"src":"/static/44cf00aba943bff992ac72c888078a70/58556/cocoapods-orange-on-grey.webp","srcSet":"/static/44cf00aba943bff992ac72c888078a70/61e93/cocoapods-orange-on-grey.webp 200w,\n/static/44cf00aba943bff992ac72c888078a70/1f5c5/cocoapods-orange-on-grey.webp 400w,\n/static/44cf00aba943bff992ac72c888078a70/58556/cocoapods-orange-on-grey.webp 800w,\n/static/44cf00aba943bff992ac72c888078a70/99238/cocoapods-orange-on-grey.webp 1200w,\n/static/44cf00aba943bff992ac72c888078a70/7c22d/cocoapods-orange-on-grey.webp 1600w,\n/static/44cf00aba943bff992ac72c888078a70/5d27a/cocoapods-orange-on-grey.webp 2338w","sizes":"(max-width: 800px) 100vw, 800px"}}}},"fields":{"authorId":"Thompson Sanjoto","slug":"/engineering/what-is-cocoapods-and-installation/"}}}]},"authorYaml":{"id":"Thompson Sanjoto","bio":"I’m a Software Engineer, I can do backend, frontend, networking, and mobile. Born and raised at Jakarta, Indonesia and went to pursue a Computer Science Degree at the University of British Columbia. Now I’m in Vancouver, BC with LoginRadius.","github":null,"stackoverflow":null,"linkedin":null,"medium":null,"twitter":null,"avatar":null}},"pageContext":{"id":"Thompson Sanjoto","__params":{"id":"thompson-sanjoto"}}},"staticQueryHashes":["1171199041","1384082988","2100481360","23180105","528864852"]}