Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

107
Mobile Continuous Delivery with a devops mindset @patrickdebois

Transcript of Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

Page 1: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

Mobile Continuous Deliverywith a devops mindset

@patrickdebois

Page 2: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

LIVE RESULTSINTERACTION MODERATIONSTUDIO CONTROLPART OF THE SHOW

Page 3: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

OPSDEV

http://www.jedi.be/blog/2012/05/12/codifying-devops-area-practices/

4 areas of improvement

Page 4: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

OPSDEV

Area 1: Extend delivery to production

http://www.jedi.be/blog/2012/05/12/codifying-devops-area-practices/

Page 5: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

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/

Page 6: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

OPSDEV

Area 2: Extend operations feedback to project

Area 1: Extend delivery to production

Area 3: Embed Projectknowledge into Operations

http://www.jedi.be/blog/2012/05/12/codifying-devops-area-practices/

Page 7: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

OPSDEV

Area 4: Embed Operations knowledge into Project

Area 2: Extend operations feedback to project

Area 1: Extend delivery to production

Area 3: Embed Projectknowledge into Operations

http://www.jedi.be/blog/2012/05/12/codifying-devops-area-practices/

Page 8: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

CI Pipeline

Page 9: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

CheckoutCode

& Metadata

InstallDependencies

UseCorrect

Build Settings

Build the executable

Setup keys& certificates

Sign the App

InstallTooling

Distribute tointernal

developers

Find matchingOS Machine

InstallSDK/Tools

Run tests

Distribute tointernaltesters

Distribute to external testers

(releasecandidates)

Promote to Public

LimitedSet of Devices

(staging)(master)

Simulator

LimitedSet of Devices(production)

(release)

Code Analysis

Test Cloudon Real Devices

Distribute internal

beta Appstore

Manage Tester List

Master branch

Release branch

Staging Build

Production build

Appstore build

Build

Promote

Page 10: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

MAC OSX CIavoid 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/

Page 11: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

SDK INSTALLATION

http://stackoverflow.com/questions/8649874/how-do-i-automate-the-installation-of-xcode

Page 12: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

SETUP IOS KEYS

Page 13: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

DEPENDENCIES

Page 14: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

SHARED SCHEMA

Page 15: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

DIFFERENT ENVIRONMENTSvisual cues

Page 16: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

BUILD CONFIGSxcode

Page 17: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

BUILD CONFIGSandroid

Page 18: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

READABLE BUILDScompact output with xctool

https://github.com/facebook/xctoolhttps://github.com/supermarin/xcpretty

Page 19: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

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/

Page 20: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

FB INFER

http://fbinfer.com/

Page 21: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

MOBILE SECURITY

http://dexter.dexlabs.org/

Page 22: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

ADHOC BUILDSshenzen

https://github.com/nomad/shenzhen

Page 23: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

DISTRIBUTE BUILDScrashlytics , hockeyapp, testfairy , …

Page 24: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

DEVICE UDIDmobile provisioning profiles

http://whatsmyudid.com/

Page 25: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

KEY MANAGEMENTcupertino

https://github.com/nomad/Cupertino

Page 26: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

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

Page 27: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

TEST APPSkeep testers up to date

Page 28: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

QR CODE URLSscan for URLs

Page 29: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

VERSION TRACKINGbuildnumbers

Page 30: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

TEST FEEDBACKmake giving feedback easy & consistent

https://github.com/DZamataev/TestFlightFeedback

Page 31: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

APPS IN BROWSERsimulator builds

https://appetize.io/https://app.io/

Page 32: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

RECORD SESSIONSSeeing is believing

Page 33: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

SCENARIO TESTINGcross technology testing

http://appium.io/

Page 34: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

ACCESIBILITY LABELSunique 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>

Page 35: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

BEHAVIOURtesting / selenium style

Page 36: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

SIMULATORSyou just can’t get enough (speed)

http://www.andyroid.net/#producthttps://www.manymo.com/emulators

https://www.genymotion.com/#!/

Page 37: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

DEVICE IN A (VIRTUAL) BOXno test excuses

https://github.com/psde/aosp-dockerhttps://plus.google.com/+BradFitzpatrick/posts/CmqtqAShWZJ

https://github.com/jkingyens/docker4xcodehttp://hackersome.com/p/dockerparis/android-test-cluster

Page 38: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

REAL DEVICESapptwack

Page 39: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

REAL DEVICESdoes it even start?

Page 40: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

DEVICE FARMS

Page 41: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

INTERACTIVE DEVICE

Page 42: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

DEBUG TRAFFIC

https://github.com/facebook/stetho

IOS

ANDROID

https://github.com/square/PonyDebugger

Page 43: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

http://www.charlesproxy.com/documentation/proxying/throttling/

Page 44: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

RE-SIGNbuild only once

https://gist.github.com/mediabounds/1367348

Page 45: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

PUBLISH TO PLAYSTORE

https://github.com/Triple-T/gradle-play-publisher

Page 46: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

IOS AUTOMATIONnot so official apple API

https://fastlane.tools/

Page 47: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

OPSDEV

Area 1: Extend delivery to production

http://www.jedi.be/blog/2012/05/12/codifying-devops-area-practices/

Page 48: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

Going Live

Page 49: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

END USER

APP APPSTORE

Social Media

SUPPORT

AnonymousPublic

User LoginNo device details

User LoginAll 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 APPFeedback

FF_RECORD_SESSION(capture more visual feedback)

FF_USE_STATIC_FAQ(switch to just a faq page)

'Live'-Chat

Re-directHappy 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

Page 50: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

METRICScustomer focused

Page 51: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

APP METRICS

https://fabric.io/

Page 52: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

NETWORK ERRORSQuisque fringilla est eget arcu tindidunt

http://newrelic.com/mobile-monitoring/features

Page 53: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

MOBILE MONITORINGit’s just another device

Page 54: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

CRASHESyou didn’t see because the app didn’t start

Page 55: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

CRASHESwhat’s happening

Page 56: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

DETAIL CRASH

Page 57: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

LOG ERRORios, android , web , backend, …

Page 58: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

CRASH REPORTSlink to user ID

Page 59: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

LOG DEBUGtagging log lines

Page 60: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

LOGGING IOS != NSLOG

Page 61: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

READ IOS LOGS

https://developer.apple.com/library/ios/documentation/System/Conceptual/ManPages_iPhoneOS/man3/asl.3.html

Page 62: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

READ LOGS ANDROID

http://stackoverflow.com/questions/12692103/read-logcat-programmatically-within-application

Page 63: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

TWITTER FEEDBACKwatch social media

Page 64: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

PLAYSTORE REVIEWautomate all the things

Page 65: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

RATINGSuser feedback android

Page 66: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

APPSTOREautomated feedback

https://launchkit.io/reviews

Page 67: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

CAPTURE FEEDBACKbefore they tell it in the App Store

Page 68: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

FRESHDESK

http://freshdesk.com/

Page 69: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

CONVERSATIONbecause email sucks

Page 70: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

NOTIFICATIONSinform the users

https://appbot.co/appbotx/getstarted

Page 71: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

SUPPORT FAQdon’t repeat yourself

Page 72: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

REVIEW PROMPTShappy customer reviews

Page 73: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

VERSION DRIFT

https://github.com/ArtSabintsev/Harpy

Page 74: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

“SHARE SCREEN”

https://watchsend.com/install

www.hotjar.com

Page 75: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

TEAM CHANNEL ++communicate all the things

Page 76: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

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/

Page 77: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

AppstoreApproval

Page 78: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

REVIEW TIMES

Page 79: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

EXPEDITEuse with care https://developer.apple.com/contact/app-store/?topic=expedite

Page 80: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

IOSAPP

USEFEATURE FLAGS

No submit needed(if it does not change the app purpose drastically)

SWIZZLINGREMOTE NSBUNDLEUSE WEBVIEW

Pre-defined behaviorchange

Dynamic behaviorchange

= hooking into functionsand it's response

Download Contentto local Documents

Load Assets from Local Bundle

ImagesLocalesSettings

XIB/NIBS

Also possible to embedCordova Webview

Use bridge to communicatewith native

REMOTECONTENT

Expect internet connectivity

Cache Image Assets

OpenGL issues

Notify users of newapp version

TO SUBMIT OR NOT TO SUBMIT

Submit(code changes & extended new app behaviour)

Page 81: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015
Page 82: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

IMAGE DELIVERYhttps://www.imgix.com/

Page 83: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

REMOTE CONFIGchange settings with new submit to App Store

https://github.com/gangverk/Android-RemoteConfighttps://github.com/mattt/GroundControl

Page 84: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

LOCALIZATION

https://github.com/joytunes/JTLocalize

Page 85: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

UI CONTROLcontrol all text & images from the backend

Page 86: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

CROSSWALKQuisque fringilla est eget arcu tindidunt

https://crosswalk-project.org/

Page 87: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

https://facebook.github.io/react-native/

Page 88: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

JOCKEY.JS https://github.com/tcoulter/jockeyjs

Page 89: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

CORDOVA/PHONEGAP

http://docs.phonegap.com/en/3.5.0/guide_platforms_ios_webview.md.html#iOS%20WebViews

Page 90: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

REMOTE BUNDLEhttps://github.com/sirnicolaz/NMRemoteBundle

Compile Xib & Storyboard

Image from Remote Bundle

Storyboard from Remote Bundle

XIB from Remote Bundle

Page 91: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

LIVE PATCHswizzling

https://www.rollout.io/http://nshipster.com/method-swizzling/

Page 92: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

OPSDEV

Area 2: Extend operations feedback to project

Area 1: Extend delivery to production

Area 3: Embed Projectknowledge into Operations

http://www.jedi.be/blog/2012/05/12/codifying-devops-area-practices/

Page 93: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

Improve the Business

Page 94: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

CollectAnalytics/Metrics

A/B Testing APPRecordInteractions

Experiment & Feedback

BUSINESS

User Retention & Involvement

Page 95: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

USER ACTIONShow do they use the app

http://heapanalytics.com

Page 96: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

RECORD HEATMAPSwhere do they click

http://appsee.com

Page 97: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

FLIGHTRECORDER

http://flightrecorder.io/

Page 98: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

FLOWsee what features are used

Page 99: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

RANKINGkeep track

https://www.appannie.com/

Page 100: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

RETENTIONwho returns?

Page 101: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

A/B TESTING

Page 102: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

A/B TESTINGscience not gut feeling

http://apptimize.com/product

Page 103: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

APP FIGURES

Page 104: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

ALL CHANNELSgo where your users are

https://www.appboy.com/products

Page 105: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

OPSDEV

Area 4: Embed Operations knowledge into Project

Area 2: Extend operations feedback to project

Area 1: Extend delivery to production

Area 3: Embed Projectknowledge into Operations

http://www.jedi.be/blog/2012/05/12/codifying-devops-area-practices/

Page 106: Mobile Delivery with a Devops Mindset - VelocityConf NYC 2015

Next up , IOT ?