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

Scheduled Releases

Scheduled Releases

Slides from presentation given at NSBarcelona September 2015 meet up.

Renzo Crisóstomo

October 01, 2015
Tweet

More Decks by Renzo Crisóstomo

Other Decks in Programming

Transcript

  1. iOS at XING • 15 developers • 6 teams (2

    central, 4 domain specific) • iOS codebase: 20 repositories • 15 libraries pods • 5 feature pods • ~1500 classes • ~155000 LOC (two months ago) • Tooling codebase: 8 repositories
  2. The problem • Release often • How often? • GitHub

    (2012): ~100 deploys per day • App Store Review • Average (29.09): 6 days • (°□°) 
  3. Release train • 4 weeks cycle • 2 weeks sprints

    • Code freeze every second friday • 2 weeks on Pre-Release • App Store release each two weeks
  4. Build • Alpha: every single commit on master • Next:

    same as Alpha, but with latest beta SDK • Beta: After code freeze, each two weeks • Mainly used by the QA team • Pre-Release: After testing beta version for two days • Tested by all XING employees (~500) and external testers • App Store: After Pre-Release phase (two weeks)
  5. Xcode • Build configurations + Schemes • User defined variables

    (~20) • xcodebuild as our CI build system • We love CocoaPods • Don't rely (excessively) on third party tooling
  6. Shipping • Not all code shipped has to be executed

    • A/B tests • Not all code on your codebase has to be shipped • Conditional compilation • Turn on/off features • Modularization • Easy to rollback • It's "OK" to ship bugs, as long as you're aware
  7. Conditional compilation #define SHOW_LOGIN_DEBUG (CONFIGURATION_Debug || CONFIGURATION_Beta || CONFIGURATION_Next) @implementation

    XNGLoginViewController ... - (void)viewDidLoad { ... #if SHOW_LOGIN_DEBUG self.loginDebugHelper = [[XNGLoginDebugHelper alloc] initWithLoginViewController:self]; #endif } ... @end
  8. Modularization • CocoaPods (20 pods) • Private Spec repos •

    Mirror public pods (XNGPodsSynchronizer) • Module manager • URL Schemes to navigate • JLRoutes
  9. @protocol XNGPackageProtocol <NSObject> + (NSString *)packageName; @optional + (void)registerURLs; +

    (NSURL *)baseURL; + (BOOL)canDoSomethingWithSomething:(SomeClass *)something; ... @end
  10. @implementation XNGModuleManager ... - (NSArray *)packageClasses { unsigned int count

    = 0; Class *classList = objc_copyClassList(&count); NSMutableArray *foundPackages = [NSMutableArray arrayWithCapacity:count]; for (int index = 0; index < count; index++) { Class pluginClass = classList[index]; if (class_conformsToProtocol(pluginClass, @protocol(XNGPackageProtocol))) { [foundPackages addObject:pluginClass]; } } free(classList); return foundPackages; } ... @end
  11. Learnings • Be strict • Practice, practice, practice • Too

    many dependencies is trouble • Modularization is hard • Be courageous ™ • Find something that works for you • and invest time understanding it
  12. Resources • Scaling mobile at XING by Alexey Krivitsky •

    http:/ /www.infoq.com/articles/scaling-agile-xing • Modular iOS App @ UIKonf 2014 by Piet Brauer • https:/ /speakerdeck.com/pietbrauer/modular-ios- app-at-uikonf-2014 • Managing Xcode by Samantha Marshall • http:/ /samdmarshall.com/blog/ managing_xcode.html