Talk given at CocoaHeads Strasbourg.
SEEDING YOUR LIBRARY WITHCocoaHeads Strasbourg Frédéric Maquin@ephreadNovember 26th, 2015
View Slide
COCOAPODS?
Centralised dependency manager forXcode projects.
AUGUST2011ELOY DURÁN@ALLOY
RUBYGEM-LIKE
GITHUB-BASED
$ [sudo] gem install cocoapodsInstallation
PODFILEVS.PODSPEC
Podfilesource 'https://github.com/CocoaPods/Specs.git'platform :ios, '8.0'use_frameworks!pod 'ElsassPod', '~> 1.0'
Podfile$ pod install
*.podspecPod::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 = trues.source_files = "ElsassPod", "Source/*.swift"s.resources = ["Source/*.xcassets"]end
MANAGING LIBRAIRIES
Automatic Integration$ pod lib createCocoaPods is opinionated!
Manual IntegrationWrite the .podspec file by hand.
$ pod spec lint mypod.posdspec$ pod lib lint mypod.posdspecREMOTELOCALLinting
LintingAlways lint your pod locally first!
Public pods$ pod trunk push ElsassPod.podspec
Private pods$ pod repo add REPO_NAME SOURCE_URL$ pod repo push REPO_NAME ElsassPod.podspec
Private podssource 'https://github.com/ephread/ElsassPodSpecs.git'
DEMO
QUESTIONS?