Slide 1

Slide 1 text

SEEDING YOUR LIBRARY WITH CocoaHeads Strasbourg Frédéric Maquin @ephread November 26th, 2015

Slide 2

Slide 2 text

COCOAPODS?

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

Centralised dependency manager for Xcode projects.

Slide 5

Slide 5 text

AUGUST 2011 ELOY DURÁN @ALLOY

Slide 6

Slide 6 text

AUGUST 2011 ELOY DURÁN @ALLOY

Slide 7

Slide 7 text

RUBYGEM-LIKE

Slide 8

Slide 8 text

GITHUB-BASED

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

$ [sudo] gem install cocoapods Installation

Slide 11

Slide 11 text

PODFILE VS. PODSPEC

Slide 12

Slide 12 text

Podfile source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' use_frameworks! pod 'ElsassPod', '~> 1.0'

Slide 13

Slide 13 text

Podfile $ pod install

Slide 14

Slide 14 text

*.podspec Pod::Spec.new do |s| s.name = "ElsassPod" s.version = "1.0.0" s.summary = "Made in Elsass" s.homepage = "https://github.com/ephread/ElsassPod" s.license = "MIT" s.author = { "Frédéric Maquin" => "[email protected]" } s.source = { :git => "https://github.com/ephread/ElsassPod.git", :tag => s.version.to_s } s.platform = :ios, "8.0" s.requires_arc = true s.source_files = "ElsassPod", "Source/*.swift" s.resources = ["Source/*.xcassets"] end

Slide 15

Slide 15 text

MANAGING LIBRAIRIES

Slide 16

Slide 16 text

Automatic Integration $ pod lib create CocoaPods is opinionated!

Slide 17

Slide 17 text

Automatic Integration $ pod lib create CocoaPods is opinionated!

Slide 18

Slide 18 text

Manual Integration Write the .podspec file by hand.

Slide 19

Slide 19 text

$ pod spec lint mypod.posdspec $ pod lib lint mypod.posdspec REMOTE LOCAL Linting

Slide 20

Slide 20 text

Linting Always lint your pod locally first!

Slide 21

Slide 21 text

Public pods $ pod trunk push ElsassPod.podspec

Slide 22

Slide 22 text

Private pods $ pod repo add REPO_NAME SOURCE_URL $ pod repo push REPO_NAME ElsassPod.podspec

Slide 23

Slide 23 text

Private pods source 'https://github.com/ephread/ElsassPodSpecs.git'

Slide 24

Slide 24 text

DEMO

Slide 25

Slide 25 text

QUESTIONS?