Tuesday, February 10, 2015

Learning CocoaPods part 2

In earlier section we have seen how to install CocoaPods in system.
Now we will see how to integrate CocoaPods

Here I am taking example of MBProgressHUD

Step 1 Create Sample Project

Step 2 Open Terminal -> Go to your project directory,

Step 3 Write Command-> pod init

This will create a pod file in your directory always open this file with xcode.

Step 4 Write Command-> pod install

If command is successful you will see "xcworkspace" file

Quite Your project and Open ".xcworkspace" file, now you need not to open ".xcodeproj" file ever

your project will look like this














Open Podfile, I am taking example of MBProgressHUD which we use to show alert and taking decision from user.






Step 5 Write Command-> $ pod install









After successful installation you will see MBProgressHUD in Pods

















Monday, February 9, 2015

Learning CocoaPods Part 1


CocoaPods is dependency manager for projects, it has Thousands of library, which can help you to scale your project elegantly.

We may have integrated Facebook API, Twitter API, Google Analytics etc, all we need to do is to drag and drop files in our projects.

What if the library gets updated, then we need to again download the library files and paste into our project. Every time we want our library to up to date.

For Handling multiple dependency we can use Cocoa Pods, its very simple in use and it give ready to use library.

Steps to Install Cocoa Pods Into your system

1. Open Terminal
2. $ sudo gem install cocoapods

Now it will take some time,














After successful installation your mac machine is ready to use CocoaPods.

In Next section we will implement small project using Cocoa Pods

Create project using CocoaPods