Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

9,178 views

Published on

An overview of the mobile tool space with a mixture of dev and ops gotchas. Mobile is where the web was 3 years ago - let's fix this.

Published in: Engineering

Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

  1. 1. Mobile Continuous Delivery with a devops mindset @patrickdebois
  2. 2. LIVE RESULTSINTERACTION MODERATION STUDIO CONTROLPART OF THE SHOW
  3. 3. OPSDEV http://www.jedi.be/blog/2012/05/12/codifying-devops-area-practices/ 4 areas of improvement
  4. 4. OPSDEV Area 1: Extend delivery to production http://www.jedi.be/blog/2012/05/12/codifying-devops-area-practices/
  5. 5. OPSDEV Area 2: Extend operations feedback to project Area 1: Extend delivery to production http://www.jedi.be/blog/2012/05/12/codifying-devops-area-practices/
  6. 6. OPSDEV Area 2: Extend operations feedback to project Area 1: Extend delivery to production Area 3: Embed Project knowledge into Operations http://www.jedi.be/blog/2012/05/12/codifying-devops-area-practices/
  7. 7. OPSDEV Area 4: Embed Operations knowledge into Project Area 2: Extend operations feedback to project Area 1: Extend delivery to production Area 3: Embed Project knowledge into Operations http://www.jedi.be/blog/2012/05/12/codifying-devops-area-practices/
  8. 8. CI Pipeline
  9. 9. Checkout Code & Metadata Install Dependencies Use Correct Build Settings Build the executable Setup keys & certificates Sign the App Install Tooling Distribute to internal developers Find matching OS Machine Install SDK/Tools Run tests Distribute to internal testers Distribute to external testers (release candidates) Promote to Public Limited Set of Devices (staging) (master) Simulator Limited Set of Devices (production) (release) Code Analysis Test Cloud on Real Devices Distribute internal beta Appstore Manage Tester List Master branch Release branch Staging Build Production build Appstore build Build Promote
  10. 10. MAC OSX CI avoid it works on my machine https://circleci.com/ https://travis-ci.com/ http://www.objc.io/issue-6/travis-ci.html https://hosted-ci.com/
  11. 11. SDK INSTALLATION http://stackoverflow.com/questions/8649874/how-do-i-automate-the-installation-of-xcode
  12. 12. SETUP IOS KEYS
  13. 13. DEPENDENCIES
  14. 14. SHARED SCHEMA
  15. 15. DIFFERENT ENVIRONMENTS visual cues
  16. 16. BUILD CONFIGS xcode
  17. 17. BUILD CONFIGS android
  18. 18. READABLE BUILDS compact output with xctool https://github.com/facebook/xctool https://github.com/supermarin/xcpretty
  19. 19. CODE ANALYSIS http://clang-analyzer.llvm.org/ http://oclint.org/ https://gist.github.com/rciovati/8461832 https://codeascraft.com/2014/01/15/static-analysis-with-oclint/
  20. 20. FB INFER http://fbinfer.com/
  21. 21. MOBILE SECURITY http://dexter.dexlabs.org/
  22. 22. ADHOC BUILDS shenzen https://github.com/nomad/shenzhen
  23. 23. DISTRIBUTE BUILDS crashlytics , hockeyapp, testfairy , …
  24. 24. DEVICE UDID mobile provisioning profiles http://whatsmyudid.com/
  25. 25. KEY MANAGEMENT cupertino https://github.com/nomad/Cupertino
  26. 26. DEMYSTIFY PROVISION PROFILES cd ~/Library/MobileDevice/Provisioning Profiles/ /usr/libexec/PlistBuddy -c 'Print DeveloperCertificates:4' /dev/stdin <<< $(security cms -D -i 3a4f7c6e-4af6-4924-a267-d9ec8e6aab75.mobileprovision) | openssl x509 -subject -inform der -noout -text
  27. 27. TEST APPS keep testers up to date
  28. 28. QR CODE URLS scan for URLs
  29. 29. VERSION TRACKING buildnumbers
  30. 30. TEST FEEDBACK make giving feedback easy & consistent https://github.com/DZamataev/TestFlightFeedback
  31. 31. APPS IN BROWSER simulator builds https://appetize.io/ https://app.io/
  32. 32. RECORD SESSIONS Seeing is believing
  33. 33. SCENARIO TESTING cross technology testing http://appium.io/
  34. 34. ACCESIBILITY LABELS unique ids for targeting UI elements #pragma mark - Accessibility - (void)addAccessibility:(UIView*)view label:(NSString*)label { view.accessibilityLabel = label; [view setIsAccessibilityElement:YES]; } - (void)addAccessibility:(UIView*)view label:(NSString*)label value:(NSString*)value { // Set accessibility programmatically // because adding it to the UserInterface Storyboard doesn't allow you to set the value for Appium [self addAccessibility:view label:label]; view.accessibilityValue = value; } <com.blokken.views.HomeTVGameButton android:id="@+id/button_tvspel" android:layout_margin="1dp" android:contentDescription = "TV SPEL" android:layout_width="@dimen/button_home_size_big" android:layout_height="@dimen/button_home_size_big" android:layout_column="2" /> </TableRow>
  35. 35. BEHAVIOUR testing / selenium style
  36. 36. SIMULATORS you just can’t get enough (speed) http://www.andyroid.net/#product https://www.manymo.com/emulators https://www.genymotion.com/#!/
  37. 37. DEVICE IN A (VIRTUAL) BOX no test excuses https://github.com/psde/aosp-docker https://plus.google.com/+BradFitzpatrick/posts/CmqtqAShWZJ https://github.com/jkingyens/docker4xcode http://hackersome.com/p/dockerparis/android-test-cluster
  38. 38. REAL DEVICES apptwack
  39. 39. REAL DEVICES does it even start?
  40. 40. DEVICE FARMS
  41. 41. INTERACTIVE DEVICE
  42. 42. DEBUG TRAFFIC https://github.com/facebook/stetho IOS ANDROID https://github.com/square/PonyDebugger
  43. 43. http://www.charlesproxy.com/documentation/proxying/throttling/
  44. 44. RE-SIGN build only once https://gist.github.com/mediabounds/1367348
  45. 45. PUBLISH TO PLAYSTORE https://github.com/Triple-T/gradle-play-publisher
  46. 46. IOS AUTOMATION not so official apple API https://fastlane.tools/
  47. 47. OPSDEV Area 1: Extend delivery to production http://www.jedi.be/blog/2012/05/12/codifying-devops-area-practices/
  48. 48. Going Live
  49. 49. END USER APP APP STORE Social Media SUPPORT Anonymous Public User Login No device details User Login All device details Logging BACKEND FEEDBACK FAQ/ Ticket system Record both App & Backend Activity Correlate JSON Logs using e-mail, device-id, customer-id CONFIG FF_ENABLE_DEBUG (enable debug if needed) IN APP Feedback FF_RECORD_SESSION (capture more visual feedback) FF_USE_STATIC_FAQ (switch to just a faq page) 'Live'-Chat Re-direct Happy Customers Fetch Settings (per user/group/device) + - Low Memory - API Errors - Warnings - Device Logs FF_DEBUG_LEVEL (increase debug if needed) Metrics Crash Reports WEBSITE
  50. 50. METRICS customer focused
  51. 51. APP METRICS https://fabric.io/
  52. 52. NETWORK ERRORS Quisque fringilla est eget arcu tindidunt http://newrelic.com/mobile-monitoring/features
  53. 53. MOBILE MONITORING it’s just another device
  54. 54. CRASHES you didn’t see because the app didn’t start
  55. 55. CRASHES what’s happening
  56. 56. DETAIL CRASH
  57. 57. LOG ERROR ios, android , web , backend, …
  58. 58. CRASH REPORTS link to user ID
  59. 59. LOG DEBUG tagging log lines
  60. 60. LOGGING IOS != NSLOG
  61. 61. READ IOS LOGS https://developer.apple.com/library/ios/documentation/System/Conceptual/ ManPages_iPhoneOS/man3/asl.3.html
  62. 62. READ LOGS ANDROID http://stackoverflow.com/questions/12692103/read-logcat-programmatically-within- application
  63. 63. TWITTER FEEDBACK watch social media
  64. 64. PLAYSTORE REVIEW automate all the things
  65. 65. RATINGS user feedback android
  66. 66. APPSTORE automated feedback https://launchkit.io/reviews
  67. 67. CAPTURE FEEDBACK before they tell it in the App Store
  68. 68. FRESHDESK http://freshdesk.com/
  69. 69. CONVERSATION because email sucks
  70. 70. NOTIFICATIONS inform the users https://appbot.co/appbotx/getstarted
  71. 71. SUPPORT FAQ don’t repeat yourself
  72. 72. REVIEW PROMPTS happy customer reviews
  73. 73. VERSION DRIFT https://github.com/ArtSabintsev/Harpy
  74. 74. “SHARE SCREEN” https://watchsend.com/install www.hotjar.com
  75. 75. TEAM CHANNEL ++ communicate all the things
  76. 76. OPSDEV Area 2: Extend operations feedback to project Area 1: Extend delivery to production http://www.jedi.be/blog/2012/05/12/codifying-devops-area-practices/
  77. 77. Appstore Approval
  78. 78. REVIEW TIMES
  79. 79. EXPEDITE use with care https://developer.apple.com/contact/app-store/?topic=expedite
  80. 80. IOS APP USE FEATURE FLAGS No submit needed (if it does not change the app purpose drastically) SWIZZLING REMOTE NSBUNDLE USE WEBVIEW Pre-defined behavior change Dynamic behavior change = hooking into functions and it's response Download Content to local Documents Load Assets from Local Bundle Images Locales Settings XIB/NIBS Also possible to embed Cordova Webview Use bridge to communicate with native REMOTE CONTENT Expect internet connectivity Cache Image Assets OpenGL issues Notify users of new app version TO SUBMIT OR NOT TO SUBMIT Submit (code changes & extended new app behaviour)
  81. 81. IMAGE DELIVERY https://www.imgix.com/
  82. 82. REMOTE CONFIG change settings with new submit to App Store https://github.com/gangverk/Android-RemoteConfig https://github.com/mattt/GroundControl
  83. 83. LOCALIZATION https://github.com/joytunes/JTLocalize
  84. 84. UI CONTROL control all text & images from the backend
  85. 85. CROSSWALK Quisque fringilla est eget arcu tindidunt https://crosswalk-project.org/
  86. 86. https://facebook.github.io/react-native/
  87. 87. JOCKEY.JS https://github.com/tcoulter/jockeyjs
  88. 88. CORDOVA/PHONEGAP http://docs.phonegap.com/en/3.5.0/guide_platforms_ios_webview.md.html#iOS%20WebViews
  89. 89. REMOTE BUNDLE https://github.com/sirnicolaz/NMRemoteBundle Compile Xib & Storyboard Image from Remote Bundle Storyboard from Remote Bundle XIB from Remote Bundle
  90. 90. LIVE PATCH swizzling https://www.rollout.io/ http://nshipster.com/method-swizzling/
  91. 91. OPSDEV Area 2: Extend operations feedback to project Area 1: Extend delivery to production Area 3: Embed Project knowledge into Operations http://www.jedi.be/blog/2012/05/12/codifying-devops-area-practices/
  92. 92. Improve the Business
  93. 93. Collect Analytics/ Metrics A/B Testing APP Record Interactions Experiment & Feedback BUSINESS User Retention & Involvement
  94. 94. USER ACTIONS how do they use the app http://heapanalytics.com
  95. 95. RECORD HEATMAPS where do they click http://appsee.com
  96. 96. FLIGHTRECORDER http://flightrecorder.io/
  97. 97. FLOW see what features are used
  98. 98. RANKING keep track https://www.appannie.com/
  99. 99. RETENTION who returns?
  100. 100. A/B TESTING
  101. 101. A/B TESTING science not gut feeling http://apptimize.com/product
  102. 102. APP FIGURES
  103. 103. ALL CHANNELS go where your users are https://www.appboy.com/products
  104. 104. OPSDEV Area 4: Embed Operations knowledge into Project Area 2: Extend operations feedback to project Area 1: Extend delivery to production Area 3: Embed Project knowledge into Operations http://www.jedi.be/blog/2012/05/12/codifying-devops-area-practices/
  105. 105. Next up , IOT ?
  106. 106. patrick@smalltownheroes.be www.smalltownheroes.be @patrickdebois

×