Mobile Devops - Cocoaheads BE Edition

Post on 13-Apr-2017

1060 Views

Category:

Engineering

1 Downloads

Preview:

Click to see full reader

Transcript

Mobile Continuous Deliverywith a devops mindset

@patrickdeboisCocoaheads BE edition

LIVE RESULTSINTERACTION MODERATIONSTUDIO CONTROLPART OF THE SHOW

OPSDEV

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

4 areas of improvement

OPSDEV

Area 1: Extend delivery to production

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

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/

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/

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/

CI Pipeline

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

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/

SDK INSTALLATION

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

SETUP IOS KEYS

DEPENDENCIES

DIFFERENT ENVIRONMENTSvisual cues

BUILD CONFIGS

READABLE BUILDScompact output with xctool

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

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/

MOBILE SECURITY

http://dexter.dexlabs.org/

BATTERY & RESOURCES

http://developer.att.com/ARO

DISTRIBUTE BUILDScrashlytics , hockeyapp, testfairy , …

DEVICE UDIDmobile provisioning profiles

http://whatsmyudid.com/

ADHOC BUILDSshenzen

https://github.com/nomad/shenzhen

DEVICE MGMTcupertino

https://github.com/nomad/Cupertino

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

TEST APPSkeep testers up to date

TEST FEEDBACKmake giving feedback easy & consistent

https://github.com/DZamataev/TestFlightFeedback

APPS IN BROWSERsimulator builds

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

RECORD SESSIONSSeeing is believing

SCENARIO TESTINGcross technology testing

http://appium.io/

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>

BEHAVIOURtesting / selenium style

DEVICE FARMS

LOCAL DEVICE CLOUD

http://mobilelabsinc.com/

REAL DEVICESdoes it even start?

INTERACTIVE DEVICE

DEBUG TRAFFIC

https://github.com/facebook/stetho

IOS

ANDROID

https://github.com/square/PonyDebugger

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

CLI IOS-DEPLOYlook no UI mama

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

CLI HELP IOS

http://www.libimobiledevice.org/

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

RE-SIGNbuild only once

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

IOS AUTOMATIONnot so official apple API

https://fastlane.tools/

OPSDEV

Area 1: Extend delivery to production

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

Going Live

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

METRICScustomer focused

APP METRICS

https://fabric.io/

NETWORK ERRORSQuisque fringilla est eget arcu tindidunt

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

MOBILE MONITORINGit’s just another device

DETAIL CRASH

CRASH REPORTSlink to user ID

LOG ERRORios, android , web , backend, …

LOG DEBUGtagging log lines

LOGGING IOS != NSLOG

READ IOS LOGS

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

TWITTER FEEDBACKwatch social media

RATINGSuser feedback android

APPSTOREautomated feedback

https://launchkit.io/reviews

CAPTURE FEEDBACKbefore they tell it in the App Store

FRESHDESK

http://freshdesk.com/

CONVERSATIONbecause email sucks

NOTIFICATIONSinform the users

https://appbot.co/appbotx/getstarted

SUPPORT FAQdon’t repeat yourself

REVIEW PROMPTShappy customer reviews

VERSION DRIFT

https://github.com/ArtSabintsev/Harpy

“SHARE SCREEN”

https://watchsend.com/install

www.hotjar.com

TEAM CHANNEL ++communicate all the things

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/

AppstoreApproval

REVIEW TIMES

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

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)

IMAGE DELIVERYhttps://www.imgix.com/

REMOTE CONFIGchange settings with new submit to App Store

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

LOCALIZATION

https://github.com/joytunes/JTLocalize

UI CONTROLcontrol all text & images from the backend

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

CORDOVA/PHONEGAP

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

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

Compile Xib & Storyboard

Image from Remote Bundle

Storyboard from Remote Bundle

XIB from Remote Bundle

LIVE PATCHswizzling

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

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/

Improve the Business

USER ACTIONShow do they use the app

http://heapanalytics.com

RECORD HEATMAPSwhere do they click

http://appsee.com

FLIGHTRECORDER

http://flightrecorder.io/

FLOWsee what features are used

RANKINGkeep track

https://www.appannie.com/

RETENTIONwho returns?

A/B TESTING

A/B TESTINGscience not gut feeling

http://apptimize.com/product

APP FIGURES

ALL CHANNELSgo where your users are

https://www.appboy.com/products

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/

Next up , IOT ?

patrick@smalltownheroes.bewww.smalltownheroes.be

@patrickdebois

top related