Top Banner
Mobile Continuous Delivery with a devops mindset @patrickdebois Cocoaheads BE edition
95

Mobile Devops - Cocoaheads BE Edition

Apr 13, 2017

Download

Engineering

Patrick Debois
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Mobile Devops - Cocoaheads BE Edition

Mobile Continuous Deliverywith a devops mindset

@patrickdeboisCocoaheads BE edition

Page 2: Mobile Devops - Cocoaheads BE Edition

LIVE RESULTSINTERACTION MODERATIONSTUDIO CONTROLPART OF THE SHOW

Page 3: Mobile Devops - Cocoaheads BE Edition

OPSDEV

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

4 areas of improvement

Page 4: Mobile Devops - Cocoaheads BE Edition

OPSDEV

Area 1: Extend delivery to production

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

Page 5: Mobile Devops - Cocoaheads BE Edition

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 Devops - Cocoaheads BE Edition

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 Devops - Cocoaheads BE Edition

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 Devops - Cocoaheads BE Edition

CI Pipeline

Page 9: Mobile Devops - Cocoaheads BE Edition

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 Devops - Cocoaheads BE Edition

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 Devops - Cocoaheads BE Edition

SDK INSTALLATION

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

Page 12: Mobile Devops - Cocoaheads BE Edition

SETUP IOS KEYS

Page 13: Mobile Devops - Cocoaheads BE Edition

DEPENDENCIES

Page 14: Mobile Devops - Cocoaheads BE Edition

DIFFERENT ENVIRONMENTSvisual cues

Page 15: Mobile Devops - Cocoaheads BE Edition

BUILD CONFIGS

Page 16: Mobile Devops - Cocoaheads BE Edition

READABLE BUILDScompact output with xctool

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

Page 17: Mobile Devops - Cocoaheads BE Edition

STATIC 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/http://fbinfer.com/

Page 18: Mobile Devops - Cocoaheads BE Edition

MOBILE SECURITY

http://dexter.dexlabs.org/

Page 19: Mobile Devops - Cocoaheads BE Edition

BATTERY & RESOURCES

http://developer.att.com/ARO

Page 20: Mobile Devops - Cocoaheads BE Edition

DISTRIBUTE BUILDScrashlytics , hockeyapp, testfairy , …

Page 21: Mobile Devops - Cocoaheads BE Edition

DEVICE UDIDmobile provisioning profiles

http://whatsmyudid.com/

Page 22: Mobile Devops - Cocoaheads BE Edition

ADHOC BUILDSshenzen

https://github.com/nomad/shenzhen

Page 23: Mobile Devops - Cocoaheads BE Edition

DEVICE MGMTcupertino

https://github.com/nomad/Cupertino

Page 24: Mobile Devops - Cocoaheads BE Edition

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 25: Mobile Devops - Cocoaheads BE Edition

TEST APPSkeep testers up to date

Page 26: Mobile Devops - Cocoaheads BE Edition

TEST FEEDBACKmake giving feedback easy & consistent

https://github.com/DZamataev/TestFlightFeedback

Page 27: Mobile Devops - Cocoaheads BE Edition

APPS IN BROWSERsimulator builds

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

Page 28: Mobile Devops - Cocoaheads BE Edition

RECORD SESSIONSSeeing is believing

Page 29: Mobile Devops - Cocoaheads BE Edition

SCENARIO TESTINGcross technology testing

http://appium.io/

Page 30: Mobile Devops - Cocoaheads BE Edition

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 31: Mobile Devops - Cocoaheads BE Edition

BEHAVIOURtesting / selenium style

Page 32: Mobile Devops - Cocoaheads BE Edition

DEVICE FARMS

Page 33: Mobile Devops - Cocoaheads BE Edition

LOCAL DEVICE CLOUD

http://mobilelabsinc.com/

Page 34: Mobile Devops - Cocoaheads BE Edition

REAL DEVICESdoes it even start?

Page 35: Mobile Devops - Cocoaheads BE Edition

INTERACTIVE DEVICE

Page 36: Mobile Devops - Cocoaheads BE Edition

DEBUG TRAFFIC

https://github.com/facebook/stetho

IOS

ANDROID

https://github.com/square/PonyDebugger

Page 37: Mobile Devops - Cocoaheads BE Edition

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

Page 38: Mobile Devops - Cocoaheads BE Edition

CLI IOS-DEPLOYlook no UI mama

https://github.com/phonegap/ios-deploy

Page 39: Mobile Devops - Cocoaheads BE Edition

CLI HELP IOS

http://www.libimobiledevice.org/

https://github.com/phonegap/ios-sim

Page 40: Mobile Devops - Cocoaheads BE Edition

RE-SIGNbuild only once

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

Page 41: Mobile Devops - Cocoaheads BE Edition

IOS AUTOMATIONnot so official apple API

https://fastlane.tools/

Page 42: Mobile Devops - Cocoaheads BE Edition

OPSDEV

Area 1: Extend delivery to production

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

Page 43: Mobile Devops - Cocoaheads BE Edition

Going Live

Page 44: Mobile Devops - Cocoaheads BE Edition

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 45: Mobile Devops - Cocoaheads BE Edition

METRICScustomer focused

Page 46: Mobile Devops - Cocoaheads BE Edition

APP METRICS

https://fabric.io/

Page 47: Mobile Devops - Cocoaheads BE Edition

NETWORK ERRORSQuisque fringilla est eget arcu tindidunt

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

Page 48: Mobile Devops - Cocoaheads BE Edition

MOBILE MONITORINGit’s just another device

Page 49: Mobile Devops - Cocoaheads BE Edition

DETAIL CRASH

Page 50: Mobile Devops - Cocoaheads BE Edition

CRASH REPORTSlink to user ID

Page 51: Mobile Devops - Cocoaheads BE Edition

LOG ERRORios, android , web , backend, …

Page 52: Mobile Devops - Cocoaheads BE Edition

LOG DEBUGtagging log lines

Page 53: Mobile Devops - Cocoaheads BE Edition

LOGGING IOS != NSLOG

Page 54: Mobile Devops - Cocoaheads BE Edition

READ IOS LOGS

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

Page 55: Mobile Devops - Cocoaheads BE Edition

TWITTER FEEDBACKwatch social media

Page 56: Mobile Devops - Cocoaheads BE Edition

RATINGSuser feedback android

Page 57: Mobile Devops - Cocoaheads BE Edition

APPSTOREautomated feedback

https://launchkit.io/reviews

Page 58: Mobile Devops - Cocoaheads BE Edition

CAPTURE FEEDBACKbefore they tell it in the App Store

Page 59: Mobile Devops - Cocoaheads BE Edition

FRESHDESK

http://freshdesk.com/

Page 60: Mobile Devops - Cocoaheads BE Edition

CONVERSATIONbecause email sucks

Page 61: Mobile Devops - Cocoaheads BE Edition

NOTIFICATIONSinform the users

https://appbot.co/appbotx/getstarted

Page 62: Mobile Devops - Cocoaheads BE Edition

SUPPORT FAQdon’t repeat yourself

Page 63: Mobile Devops - Cocoaheads BE Edition

REVIEW PROMPTShappy customer reviews

Page 64: Mobile Devops - Cocoaheads BE Edition

VERSION DRIFT

https://github.com/ArtSabintsev/Harpy

Page 65: Mobile Devops - Cocoaheads BE Edition

“SHARE SCREEN”

https://watchsend.com/install

www.hotjar.com

Page 66: Mobile Devops - Cocoaheads BE Edition

TEAM CHANNEL ++communicate all the things

Page 67: Mobile Devops - Cocoaheads BE Edition

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 68: Mobile Devops - Cocoaheads BE Edition

AppstoreApproval

Page 69: Mobile Devops - Cocoaheads BE Edition

REVIEW TIMES

Page 70: Mobile Devops - Cocoaheads BE Edition

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

Page 71: Mobile Devops - Cocoaheads BE Edition

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 72: Mobile Devops - Cocoaheads BE Edition
Page 73: Mobile Devops - Cocoaheads BE Edition

IMAGE DELIVERYhttps://www.imgix.com/

Page 74: Mobile Devops - Cocoaheads BE Edition

REMOTE CONFIGchange settings with new submit to App Store

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

Page 75: Mobile Devops - Cocoaheads BE Edition

LOCALIZATION

https://github.com/joytunes/JTLocalize

Page 76: Mobile Devops - Cocoaheads BE Edition

UI CONTROLcontrol all text & images from the backend

Page 77: Mobile Devops - Cocoaheads BE Edition

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

Page 78: Mobile Devops - Cocoaheads BE Edition

CORDOVA/PHONEGAP

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

Page 79: Mobile Devops - Cocoaheads BE Edition

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

Compile Xib & Storyboard

Image from Remote Bundle

Storyboard from Remote Bundle

XIB from Remote Bundle

Page 80: Mobile Devops - Cocoaheads BE Edition

LIVE PATCHswizzling

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

Page 81: Mobile Devops - Cocoaheads BE Edition

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 82: Mobile Devops - Cocoaheads BE Edition

Improve the Business

Page 83: Mobile Devops - Cocoaheads BE Edition

USER ACTIONShow do they use the app

http://heapanalytics.com

Page 84: Mobile Devops - Cocoaheads BE Edition

RECORD HEATMAPSwhere do they click

http://appsee.com

Page 85: Mobile Devops - Cocoaheads BE Edition

FLIGHTRECORDER

http://flightrecorder.io/

Page 86: Mobile Devops - Cocoaheads BE Edition

FLOWsee what features are used

Page 87: Mobile Devops - Cocoaheads BE Edition

RANKINGkeep track

https://www.appannie.com/

Page 88: Mobile Devops - Cocoaheads BE Edition

RETENTIONwho returns?

Page 89: Mobile Devops - Cocoaheads BE Edition

A/B TESTING

Page 90: Mobile Devops - Cocoaheads BE Edition

A/B TESTINGscience not gut feeling

http://apptimize.com/product

Page 91: Mobile Devops - Cocoaheads BE Edition

APP FIGURES

Page 92: Mobile Devops - Cocoaheads BE Edition

ALL CHANNELSgo where your users are

https://www.appboy.com/products

Page 93: Mobile Devops - Cocoaheads BE Edition

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 94: Mobile Devops - Cocoaheads BE Edition

Next up , IOT ?