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

Modular iOS Apps

Modular iOS Apps

Given at the Hamburg edition of CocoaHeads 03.03.2014

http://cocoaheads.org/de/Hamburg/
https://twitter.com/pietbrauer

48f07655aeed5ca639b37b05e52d4cb3?s=128

Piet Brauer

March 03, 2014
Tweet

Transcript

  1. Modular IOS APPS

  2. GOALS

  3. divide THE XING IOS APP INTO LOGICAL PARTS

  4. make it easier FOR NEW COWORKERS TO GET STARTED

  5. ENABLE versioning IN THE DIFFERENT MODULES

  6. slim down THE MAIN APP

  7. MAKE OTHER PRODUCT TEAMS more productive

  8. WRITE cleaner code DUE TO SEGMENTATION

  9. HOW

  10. ▸ CocoaPods ▸ Rake ▸ Jenkins ▸ Ruby command line

    tool
  11. EACH MODULE HAS A PODSPEC

  12. PRIVATE COCOAPODS SPECS REPOSITORY ON GITHUB ENTERPRISE

  13. JENKINS BUILDS THE SPEC REPO ON EVERY PULL REQUEST AND

    CHECKS FOR VALID PODSPECS Just like the real Specs Repo
  14. unified rake tasks FOR EACH PROJECT

  15. rake build # builds the project for CI rake version:bump:minor

    # bumps minor, patch and major version number rake git:release # tags the version and pushes to master rake pod:push # pushes the podspec to the master repo
  16. RUBY CLI ▸ based on Thor gem ▸ heavily uses

    Xcodeproj from Cocoapods
  17. $ xcnew help new Usage: xcnew new PROJECTNAME PREFIX Description:

    `xcnew new` creates a new XING iPhone App module project to get you up and running in no time. It will create our desired file structure for modules, install our dependencies and create simple Xcode project with Login using the XNGAPIClient. $ xcnew new XNGCocoaHeads CH
  18. DEMO

  19. MODULES

  20. 13 CORE MODULES EXTRACTED 21 OTHER MODULES (REGULAR PODS)

  21. XNGUIKIT UIDEVICE, UIIMAGE, UIIMAGEVIEW, ... CATEGORIES AND SUBCLASSES

  22. XNGFOUNDATION NSSTRING, NSARRAY, NSDICTIONARY, ... CATEGORIES AND SUBCLASSES

  23. XNGDATAMODEL COREDATA MODEL, MOGENERATOR MODELS, MODELS, DATAFETCHER ETC.

  24. BASEVIEWCONTROLLERS UIVIEWCONTROLLER, UICOLLECTIONVC, UITABLEVC, ...

  25. OTHER MODULES LOGIN, WALKTHROUGH, REGISTER, XNGFONT, XNGCOLOR, TRACKER ...

  26. WHAT'S next?

  27. PORT THE INSTALLER TO COCOAPODS GitHub: pietbrauer/cocoapods-generate-command

  28. APPLY MODULES PATTERN TO NETWORK NEWS, PROFILE ETC. ONCE THE

    SMALL ISSUES ARE RESOLVED
  29. FIND MORE IOS DEVELOPERS.

  30. BUILD MORE MODULES.

  31. ANSWER YOUR QUESTIONS.

  32. THANKS ! @PIET_NBN