forsythetony / CollegeComparison

An iOS application built for Team-Based Mobile Device Application Development (INFOTC 4500) in fall semester of 2013.
Other
1 stars 0 forks source link

Setting up CocoaPods #46

Open forsythetony opened 10 years ago

forsythetony commented 10 years ago

So I've used CocoaPods to install some of the latest updates to the application. CocoaPods is great because it takes care of all code dependencies for you. So if you see something online and then integrate it into your code you won't have to worry about any possible libraries that this new features depends on. So here's how to install it. CocoaPods Website

  1. Open up terminal and in whatever directory you land in type in the command sudo gem install cocoapods
  2. Now change directories to get to wherever your CollegeComparison folder is. This is what I would type on my computer. cd ~/Documents/.coding/CollegeComparison
  3. Now that your in your college comparison folder make sure there is a podfile. Use the command ls to list directories. This is what I see:
    • screen shot 2014-02-06 at 9 47 46 pm
    • You may not see all of these files but as long as you have Podfile you should be good.
  4. Now pull down the latest code. git pull
  5. Now install the pods by entering pod install
    • This will install the pods as specified by the podfile. You should not have to modify the podfile if you've pulled down the latest code. When switching branches you should run pod install again to make sure you have all the necessary pods for this branch.
  6. Here's the part that sucks. pod install will overwrite my modifications to to the barchart files to get values to display above the bars. If you don't replace the code in PNChart.m and PNChart.h with the code found here you'll get an error about Xcode not being able to find an interface for the function whatever. I'm trying to find a better way but for now you'll have to do this to get it to work.
  7. It's best to clean the build folder in Xcode before building the project. You can do this by clicking on "Product" in the top navigation bar then holding down the "alt" key then clicking on clean build folder.
  8. You should be able to see the new charts now!
forsythetony commented 10 years ago

Forget #6 I've figured out how to get the changes to stick. I had to fork the repo and edit the Podfile to grab updates from that repo. If you need to make any changes to those files just submit a pull request to this repo https://github.com/forsythetony/PNChart