Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Modular iOS App @ UIKonf 2014

Modular iOS App @ UIKonf 2014

Given at the UIKonf 2014 in Berlin.

Avatar for Piet Brauer

Piet Brauer

May 15, 2014
Tweet

More Decks by Piet Brauer

Other Decks in Programming

Transcript

  1. Facebook Uses ... » ... one large work space »

    ... static libraries and bundles » ... xcconfig files » ... FBFoundation, FBUIKit, FBDataModel, FBAppKit » ... Modules register via module manager » ... URL schemes to navigate Modules @ Facebook
  2. PSPDFKit Uses ... » ... Dependency Injection » ... a

    Plugin Infrastructure » ... Aspect oriented programming » ... URL schemes to navigate (with JLRoutes) Aspect by Steipete Slides from ITT
  3. XING (Will) Use(s) ... » ... multiple independent projects »

    ... CocoaPods to link them » ... XNGFoundation, XNGUIKit, XNGDataModel, etc. » ... domain specific modules » ... a module manager » ... URL schemes to navigate
  4. Versioneye » ... monitors your projects » ... monitors open

    source libraries » ... notifies you if a new update was released » ... draws a beautiful dependency graph
  5. Rake tasks » Rake is to Ruby what Make is

    to C » easy to write scripts Sample rake bootstrap # Installs dependencies rake ci # Runs everything needed for the ci server rake deploy # Deploys Beta rake release # Release a new version of the Pod rake spec # Runs the specs
  6. Pull Requests work flow » each developer works on his

    own fork » when he is done he makes Pull Requests » Jenkins builds them and gives feedback » another team mate reviews the code and merges » reviewer decides what version number to pick and releases
  7. How we use Jenkins Jenkins ... » ... is triggered

    on every git commit » ... runs the unit tests » ... sets the build status on the commit in Github
  8. Generated project !"" Assets !"" CHANGELOG.md !"" Classes !"" Example

    # !"" Assets # !"" Example # !"" Example.xcodeproj # !"" Podfile # !"" Podfile.lock # $"" UnitTests !"" Gemfile !"" Gemfile.lock !"" LICENSE !"" README.md !"" Rakefile !"" UIKonf.podspec $"" UIKonf.xcworkspace
  9. Development pods pod 'UIKonf', :path => '../UIKonf.podspec' » does not

    copy source files » work as if the files are in your project » see immediately if something is not public
  10. Semantic Versioning Is a pain because ... » ... we

    want every team to use a latest version » ... dependent pods » ... informing other teams about updates is time consuming » ... you never know what you break exactly
  11. Semantic Versioning Why resolve the dependencies? » see which pods

    depend on one » see unnecessary dependencies
  12. Semantic Versioning Now works for us because ... » ...

    Versioneye tracks new versions and informs » ... we don't pin the version in podspecs anymore » ... Jenkins builds all projects that depend on the changed pod
  13. Data Model Is a pain because ... » ... it

    is one CoreData file » ... all pods somehow depend on it
  14. Data Model Now works for us because ... » ...

    it only contains mogenerator generated files
  15. Jenkins Was a pain because ... » ... it cannot

    build forks » ... setting it up takes time
  16. Jenkins Now works for us because ... » ... each

    pod has the same Rakefile » ... all we need to execute is rake ci
  17. Localized Strings Was a pain because ... » ... Localization

    was spread across pods » ... you couldn't track duplicates » ... changes were hard
  18. Localized Strings Now works for us because ... » one

    pod containing all translations » will be maintained by translators » People make Pull Requests with their translations
  19. Images Was a pain because ... » ... there were

    duplicates across the pods » ... changes were hard » ... 2 images with the same name could occur
  20. Images Now work for us because ... » ... resource

    bundle feature in CocoaPods » ... we load them from a bundle » .. no conflicts in naming because of bundles
  21. Images * Jenktocat, https://octodex.github.com/images/jenktocat.jpg * Johann Lafer - Rezepte aus

    meiner Heimat, https://itunes.apple.com/de/app/johann-lafer-rezepte-aus-meiner/id505874478?mt=8 * Sommerrezepte - Die besten Rezepte für die Urlaubssehnsucht, https://itunes.apple.com/de/app/sommerrezepte-die-besten-rezepte/id680597527?mt=8 * Schlank im Schlaf - Die original Rezepte, https://itunes.apple.com/de/app/schlank-im-schlaf-die-original/id584432534?mt=8 * Jenkins, http://fabiouechi.blogspot.de/2012/11/setting-up-jenkins-on-ec2-using.html * Travis CI, http://jmikola.github.io/slides/beautiful_measurable_software/img/travis-mascot-600px.png