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

How to quickly eat your own dog food in iOS

How to quickly eat your own dog food in iOS


March 12, 2014

More Decks by RestlessThinker

Other Decks in Technology


  1. How to quickly eat your own dog food in iOS

  2. When a company uses it’s own product to determine quality

    and capabilities of the product What is dog fooding?
  3. Why is it important? • Testing when developing isn’t good

    enough • Faster Feedback • Find "Jankyness" faster • Iterate quickly on things that matter • Validate assumptions and hypotheses
  4. Who is dog fooding? • Google • Microsoft • Atlassian

    • Foursquare • Apple
  5. Before Gmail was released to the public… • Sergei and

    Larry used it as their personal email clients in early stages • 3000 Google employees • Obsessed about speed
  6. Facebook Home • They should have spent more time “Droidfooding”!

    • Launched April 12, 2013 • In June, Facebook announced a beta testing program for Android users • User complaints about battery life and user experience
  7. Dog Fooding Test-driven development Timeboxing Acceptance testing Spike Sprint Planning

    Planning Poker Story Point Estimation User Stories Sprint Pair Programming Behavior-driven development Velocity Tracking Scrum
  8. Cocoapods Two-Binary System Automate Builds App distribution The Formula! Feedback

    & Logging
  9. Cocoapods

  10. Cocoapods What is Cocoapods?! • library dependency management system for

    Xcode projects • Similar to Ruby Gems or Java Maven
  11. Cocoapods Why Cocoapods?! • Alternatives to this aren’t really that

    great right now • Many components and libraries to choose from • Allows reuse of internal code libraries • Reduces error when dealing with framework search paths
  12. Cocoapods Things to consider! • Don’t be afraid to have

    your own internal pods • Pods are 3rd party libraries and are not “silver bullets” • Revisit before shipping to production and use a checklist for accepting a 3rd party library • For more information visit http://cocoapods.org
  13. Two-Binary System

  14. Benefits • Alpha/Beta or Beta/ Production environments • Debugging Services

 (SSL vs. Non SSL) • Separate push notifications • Feature toggling • Separate analytics Two-Binary System
  15. How to setup for Two Binaries Two-Binary System

  16. Two-Binary System iOS App Identifiers Create 2 unique app identifiers

  17. Two-Binary System Production Certificates If your app is using notifications

    create one for each app ID
  18. Two-Binary System Provision Profile (Development) Two separate profiles

  19. Two-Binary System Provision Profile (Distribution) Two separate profiles

  20. Remember to treat it as two separate apps! We do

    compile and ship two separate binaries.
  21. Two-Binary System Xcode Setup

  22. Start by duplicating the app target Two-Binary System Xcode Setup

  23. Two-Binary System Copy Target

  24. Two-Binary System Create a 2nd Plist

  25. Rename the duplicate target name Two-Binary System Rename for Beta

  26. Rename plist identifier Two-Binary System Renaming for Beta

  27. After duplication, change the provision profile Two-Binary System Copy Target

  28. Two-Binary System Duplicate Test Targets

  29. Project -> Manage Schemes Two-Binary System Managing Schemes

  30. Two-Binary System Preprocessor Macros

  31. In the end you should have two runtime targets Two-Binary

    System Two Binaries Complete
  32. Feature Toggling Now the fun begins!

  33. Setting up Feature Toggling Two-Binary System As a Constant vs

    using the preprocessor macro
  34. Feature Toggling (Constants) Two-Binary System

  35. Stubbing Data Feature Toggling (Services) Two-Binary System

  36. Debugging end points on SSL Feature Toggling (Services) Two-Binary System

  37. Feature Toggling (Views) Two-Binary System

  38. • Can get out of hand easily • If you’re

    using pre-processor macros you lose come compile time checking per target, test on separate targets • You can just define a constant set by the pre-processor macro • Keep it simple! Feature Toggling (Views) Two-Binary System
  39. Automated Builds Bringing everything together

  40. Why is it important? • Helps eliminate human error •

    Builds are asynchronous so you can spend your time being productive while you wait • Saves time doing repetitive tasks • Makes the two binary system and feature toggling easier to manage • Teams can get passive notifications versus PMs asking for the status Automated Builds
  41. Key points • Have the team decide on a build

    schedule - i.e. Once a day, twice a day etc. • Try to be strict about your build regimen • Don't get overwhelmed by automation scripts, think of builds as a living document that will always change as your app requirements and team requirements change. Automated Builds
  42. Choose what works for you • Jenkins - jenkins-ci.org •

    Bamboo - atlassian.com • Team City - jetbrains.com • Xcode bots - ships with Xcode 5 Automated Builds
  43. Once you decide... • Almost every CI will use a

    plugin for building iOS • If you are using Cocoapods, remember to use workspaces not projects • Automate uploading to a distribution system Automated Builds
  44. • For unit tests use xctool https://github.com/facebook/ xctool • UIAutomation

    tests use Bwoken - https://github.com/ bendyworks/bwoken • Cross Platform automation Appium - http://appium.io/ When you have tests… Automated Builds
  45. App Distribution Getting your app to more dog fooders!

  46. App Distribution What is App Distribution?! iTunes Store Users Ad

    Hoc Beta Users Dog Fooders
  47. Example of 2 apps in hockey app App Distribution Create

    two apps!!
  48. • Gets your app into the wild • Testers can

    get daily builds • Don't need the testers physical device to install the app • Some allow feedback modules in-app • Some have crash reporting services • Isolate bugs on a per binary basis • Keeps track of dSYM and IPA files instead of checking it into source control App Distribution Why is it important?!
  49. • Hockey App - hockeyapp.net • Test Flight - testflightapp.com

    App Distribution Choose what works for you!
  50. Feedback & Logging

  51. Feedback & Logging Users are your lifeline!

  52. Feedback & Logging Crash Reporting! • PLCrashReporter • Usually bundled

    with SDKs for analytics and ad-hoc distribution systems • Keep your dSYM files
  53. Feedback & Logging Crash Reporting! • Hockeyapp http://hockeyapp.net • Test

    Flight http://testflightapp.com • Crashlytics http://crashlytics.com
  54. Feedback & Logging Logging! • Not all errors will crash

    the app • Use analytics systems to log errors!
 (Google Analytics, Mixpanel) • Track the “error” as an “event”
  55. Feedback & Logging Logging!

  56. Cocoapods Two-Binary System Automate Builds App distribution Feedback & Logging

  57. Thank You @RestlessThinker