Flatiron Day 20: CocoaPods

Paul Hegarty on the Big Screen

Paul Hegarty on the Big Screen

Today we started by watching Paul Hegarty of the Stanford CS193P Course give the Core Data Lectures from the Winter 2013 iTunes U Coding Together sessions.  Watching the lectures again now after these three weeks at Flatiron I noticed many things I did not see the first time around.  An example is that he teaches about UIManagedDocument which is a container for the NSManagedObject and is a cross between a high-level document abstraction and the Core Data stack.  I’ll need to come back to this and experimet with its usage.  This UIDocument subclass is on the road to iCloud so it seems promising.

We received our ID cards today but they don’t work yet – hopefully, they’ll work in the next couple of days.  For Afternoon Lecture we continued from yesterday’s quick install and overview of CocoaPods to now dive deeper into them. We started by taking a project and with Sublime we created our first Podfile.  This is simple with the first line simply being:

  • platform :ios, ‘5.0’

This tells CocoaPods the target platform and version. With a ‘pod install‘ command from terminal the project is Pod-ified.  From here you can add the specific pods to the Podfile and execute pod update commands from the terminal.

We added the XYPieChart pod to the Senari todo App we are building.

This was done with just one line in the PodFile:

  • pod ‘XYPieChart’, ‘~> 0.2’

We then made a Pie Chart by using the pod and it could not have been easier.

Tomorrow, we’ll use another CocoaPod to implement a slide view container.  We’ll also spend the morning adding Core Data to the class Location Quiz App.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s