Seeding your library with CocoaPods

Seeding your library with CocoaPods

Talk given at CocoaHeads Strasbourg.

07cace5d941b67f22d030088283a10f0?s=128

Frédéric Maquin

November 26, 2015
Tweet

Transcript

  1. SEEDING YOUR LIBRARY WITH CocoaHeads Strasbourg Frédéric Maquin @ephread November

    26th, 2015
  2. COCOAPODS?

  3. None
  4. Centralised dependency manager for Xcode projects.

  5. AUGUST 2011 ELOY DURÁN @ALLOY

  6. AUGUST 2011 ELOY DURÁN @ALLOY

  7. RUBYGEM-LIKE

  8. GITHUB-BASED

  9. None
  10. $ [sudo] gem install cocoapods Installation

  11. PODFILE VS. PODSPEC

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

    1.0'
  13. Podfile $ pod install

  14. *.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" => "fred@ephread.com" } 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
  15. MANAGING LIBRAIRIES

  16. Automatic Integration $ pod lib create CocoaPods is opinionated!

  17. Automatic Integration $ pod lib create CocoaPods is opinionated!

  18. Manual Integration Write the .podspec file by hand.

  19. $ pod spec lint mypod.posdspec $ pod lib lint mypod.posdspec

    REMOTE LOCAL Linting
  20. Linting Always lint your pod locally first!

  21. Public pods $ pod trunk push ElsassPod.podspec

  22. Private pods $ pod repo add REPO_NAME SOURCE_URL $ pod

    repo push REPO_NAME ElsassPod.podspec
  23. Private pods source 'https://github.com/ephread/ElsassPodSpecs.git'

  24. DEMO

  25. QUESTIONS?