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

iOS < Design, Development > issue - 4

devRead # Advanced iOS development features Many app-related tasks depend on the type of app you are trying to create. This topic shows you how to implement some of the common behaviors found in iOS apps. CocoaPods by Objc.io CocoaPods... Continue →