COCOAPODS

create own pods
Nahit Rüştü HEPER

@nahitheper
Cocoapods ?
Dependency Manager ?
Why ?
Managing Dependencies with CocoaPods
Find a library
Add to 

your project
Keep it 

up-to-date
Reuse code
Cocoapods
Central Repository (Trunk)
PodFile
Command Line Utility
Cocoapods
sudo gem install cocoapods
Cocoapods
pod init
project '../Example/ExampleProject.xcodeproj'
platform :ios, '9.0'
use_frameworks!
def default_pods
pod 'Kingfisher', '3.3.3'
pod 'FBSDKCoreKit', '4.18.0'
pod 'FBSDKLoginKit', '4.18.0'
pod 'Fabric', '1.6.11'
pod 'Crashlytics', '~>1.22'
pod 'Gifu', '2.0.0'
pod 'Alamofire', '~>2.22'
end
target 'ExampleProd' do
default_pods
end
target 'ExampleDevelop' do
default_pods
end
Cocoapods
pod install
Pod version
Uses semantic (semver.org)
major.minor.patch
target 'Example' do
pod 'Kingfisher', '>3.3.3'
pod 'FBSDKCoreKit', '>=4.1.0'
pod 'FBSDKLoginKit', '<4.1.0'
pod 'Fabric', '<=1.6.11'
pod 'Crashlytics', '~>1.2.2'
pod 'Gifu', '2.0.0'
pod 'Alamofire', '~>2.2.2'
end
pod update
Choosing Dependencies
Community
Maintenance
Documentation
Should i commit ?
Create Your Own Pods
pod lib create Katip
Specify the language (Swift / ObjC)
Include Demo App
Testing Frameworks
View based testing
Katip.podspec
.name the name of your pod
.version your pod version
.summary
.description
.licence
ReplaceMe.swift
git add .
git commit -m "Initial Commit"
git remote add origin https://github.com<USERNAME>/Katip.git
git push -u origin master
git tag 0.1.0
git push origin 0.1.0
pod spec lint Katip.podspec
> Analyzed 1 podspec.

> Katip.podspec passed validation.
pod trunk register  nahitheper@gmail.com “Nahit Rüştü HEPER”
pod trunk push Katip.podspec
Open Source
Demo
Developing code for others
@IBDesignable

@IBInspectable
open / public
Delegates
Logo

Wiki

shields.io

demo

screenshot
Thanks.
Nahit Rüştü HEPER

@nahitheper

Creating Cocoapods Library