uchicago-mobi / 2016-Winter-Forum

Class Forum for MPCS51030.
3 stars 0 forks source link

CocoaPods #195

Closed bobby-digital-23 closed 8 years ago

bobby-digital-23 commented 8 years ago

I briefly mentioned CocoaPods in a previous forum post. I hope this post will be helpful for those of you who would like to use a framework, library, class, etc which requires the use of CocoaPods. Please share any helpful sites or thoughts you have with the rest of the class! 🙂

First, I recommend learning what CocoaPods are and how they work. This brief description on the official site is very helpful. https://cocoapods.org/about

Additionally, understanding when you should update or install a CocoaPod is also very helpful. https://guides.cocoapods.org/using/pod-install-vs-update.html

The CocoaPods Github page also has many links to helpful resources: https://github.com/CocoaPods/CocoaPods

You'll find many tutorials online. Here is one helpful tutorial from our friends at raywenderlich.com: How to Use CocoaPods with Swift http://www.raywenderlich.com/97014/use-cocoapods-with-swift

Installation Tips Many projects which use CocoaPods will presume that you know how to use Ruby, at least at a very basic level. Some CocoaPods will also require that you have the most current version of Ruby installed on your Mac but they might not mention this until you start to install the .

Installing things in this order might save you some time and needless frustration. 😉

  1. Try to use the version of Ruby that is already installed on your Mac. However, if your CocoaPod does require the most current version of Ruby (which is typically NOT installed on El Capitan by default), then update the version of Ruby on your Mac. Doing this before you install CocoaPods is helpful but you can always update CocoaPods at anytime (see link to installation guide below). You can easily check which version of Ruby you have installed on your Mac by typing $ ruby -v on a command line.
  2. Install CocoaPods. It is quite straightforward if you type $ sudo gem install cocoapods on a command line but there are several ways to install it. Please read the CocoaPods installation guide.
  3. If you need to install a CocoaPod which states that you should type $ bundle install in the installation instructions (which is most CocoaPods btw), you will also need to install Bundler. It is very easy to install - you literally just need to type $ gem install bundler on a command line.

Xcode Plugins First there are several Xcode CocoaPods plugins for those of you who dislike using the command line. You will still have to install CocoaPods first but once you do, you can supposedly use CocoaPods from within Xcode. If anyone tries any of these plugins, please share your thoughts with the rest of the class as to whether these plugins are useful and/or easier to use compared to using CocoaPods on the command line.

CocoaPods for Xcode https://github.com/kattrali/cocoapods-xcode-plugin

CocoaPodUI https://github.com/Galeas/CocoaPodUI

tabinks commented 8 years ago

Also, see #193

tabinks commented 8 years ago

Also #196