How to Make a Pod of your iOS library

This post is about converting your iOS project into a pod and not how to upload it to CocoaPods (yes you can make private pods too). So here are the steps:

Pod:: Spec.new do |spec|
  spec.name         =  'your_project_name'
  spec.version      =  'your_project_version_number'
  spec.summary   =  'your_project_summary'
  spec.author = {
    'developer_name' => 'developer_email'
  }
  spec.license          =  'MIT' 
  spec.homepage         =  'your_project_homepage_url'
  spec.source = {
    :git => 'your_projects_github_https_git_url',
    :branch => 'your_project_branch_name'
  }
  spec.source_files =  'your_folder_name_which_has_all_the_lib_files/*.{h,m}'
  spec.requires_arc     =  true
end

Now anyone who wants to use your pod then they have to add the following line in their pod file.

pod 'library_name', :git => 'library_github_https_git_url', :branch => 'branch_name'

Now let me share what some of the terms (the ambiguous ones) in the podspec means:


 
4
Kudos
 
4
Kudos

Now read this

Dynamic Cell Size in UITableView - new iOS 8 api

One of the new iOS-8 api allow the developers to provide dynamic height to their tableView cells without much hassle. So now we don’t have to implement the following method - (CGFloat)tableView:(UITableView *)tableView... Continue →