Publishing your library with Carthage

Publishing your library with Carthage

Talk given at CocoaHeads Strasbourg.

07cace5d941b67f22d030088283a10f0?s=128

Frédéric Maquin

June 30, 2016
Tweet

Transcript

  1. PUBLISHING YOUR LIBRARY WITH CARTHAGE Frédéric Maquin @ephread CocoaHeads Strasbourg

    June 30th, 2016
  2. 2

  3. Decentralised dependency manager for Xcode projects. 3

  4. OCTOBER 2014 JUSTIN SPAHR-SUMMERS 4

  5. OCTOBER 2014 JUSTIN SPAHR-SUMMERS 4

  6. Written in Swift. Based on iOS 8+ dynamic frameworks. 5

  7. VS. 6

  8. CocoaPods is CENTRALISED, EASY but INTRUSIVE. 7

  9. Carthage is DECENTRALISED, UNINTRUSIVE and SIMPLE. CARTHAGE 8

  10. EASY SIMPLE ≠ 9

  11. GETTING STARTED 10

  12. INSTALLATION $ brew install carthage 11

  13. INSTALLATION https://github.com/Carthage/Carthage/releases or download PREBUILT PACKAGES. 12

  14. Cartfile github "ReactiveCocoa/ReactiveCocoa" git "https://enterprise.local/desktop/git-error-translations2.git" 13

  15. Cartfile github "ReactiveCocoa/ReactiveCocoa" git "https://enterprise.local/desktop/git-error-translations2.git" ~> 4.0 13

  16. Cartfile github "ReactiveCocoa/ReactiveCocoa" git "https://enterprise.local/desktop/git-error-translations2.git" "master" 13

  17. Cartfile $ carthage update 14

  18. Cartfile $ carthage update FETCH the code and BUILD the

    framework. 14
  19. FRAMEWORK LINKING 15

  20. STRIP ARCHITECTURE (iOS) Work around an App Store BUG. 16

  21. You’re ALL SET! 17

  22. PUBLISH 18

  23. Bundle your code in a FRAMEWORK. 19

  24. Share your SCHEMES. PRODUCT > SCHEME > MANAGE SCHEMES… 20

  25. It doesn’t get any SIMPLER. 21

  26. It doesn’t get any SIMPLER. But don’t forget to TAG

    versions. 21
  27. It doesn’t get any SIMPLER. But don’t forget to TAG

    versions. And PUSH the code somewhere… 21
  28. IN SHORT 22

  29. CocoaPods is EASY TO USE and can LINT/ANALYSE your code.

    PROS 23
  30. CocoaPods can even generate the DOCUMENTATION for you. PROS 24

  31. CONS CocoaPods is INTRUSIVE and can be SLOW. 25

  32. Pods require some WORK to publish. CONS 26

  33. Carthage is FAST, UNINTRUSIVE and SIMPLE. CARTHAGE PROS 27

  34. Carthage ONLY SUPPORTS iOS 8+. CARTHAGE CONS 28

  35. Carthage requires more work when IMPORTING LIBRAIRIES. CARTHAGE CONS 29

  36. By the way, I prefer CARTHAGE over COCOAPODS. :o) 30

  37. QUESTIONS? 31