better ios development with groovy

60
BETTER IOS DEVELOPMENT WITH GROOVY Rahul Somasunderam (@rahulsom)

Upload: spring-by-pivotal

Post on 22-Jan-2018

1.183 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Better IOS Development with Groovy

BETTERIOSDEVELOPMENTWITHGROOVY

RahulSomasunderam(@rahulsom)

Page 2: Better IOS Development with Groovy

ABOUTME

Page 3: Better IOS Development with Groovy

WHEREIWORK

Page 4: Better IOS Development with Groovy
Page 5: Better IOS Development with Groovy
Page 6: Better IOS Development with Groovy

WHYIOS?Andwhyatathisconference?

Page 7: Better IOS Development with Groovy

WHATDOESITTAKETOBUILDANIOSAPP?

Page 8: Better IOS Development with Groovy

XCODEORAPPCODE

Page 9: Better IOS Development with Groovy

SWIFTVSOBJECTIVE-C

Page 10: Better IOS Development with Groovy

SWIFTVSOBJECTIVE-C

Tooling

Page 11: Better IOS Development with Groovy

SWIFTVSOBJECTIVE-C

Tooling

Libraries

Page 12: Better IOS Development with Groovy

DEPENDENCYMANAGEMENT

Page 13: Better IOS Development with Groovy

DEPENDENCYMANAGEMENT

Librariesvsframeworks

Page 14: Better IOS Development with Groovy
Page 15: Better IOS Development with Groovy

AndIdon’tmeantransitivedependencies…

Page 16: Better IOS Development with Groovy

DEPENDENCIES

Page 17: Better IOS Development with Groovy

DEPENDENCIES

Yourappneedsdependencies

Page 18: Better IOS Development with Groovy

DEPENDENCIES

Yourappneedsdependencies

DependenciescanbeinstalledwithCocoapods

Page 19: Better IOS Development with Groovy

DEPENDENCIES

Yourappneedsdependencies

DependenciescanbeinstalledwithCocoapods

Cocoapodsisarubygem

Page 20: Better IOS Development with Groovy

DEPENDENCIES

Yourappneedsdependencies

DependenciescanbeinstalledwithCocoapods

Cocoapodsisarubygem

RubygemscanbeinstalledwithBundler

Page 21: Better IOS Development with Groovy

DEPENDENCIES

Yourappneedsdependencies

DependenciescanbeinstalledwithCocoapods

Cocoapodsisarubygem

RubygemscanbeinstalledwithBundler

YouWANTrubyintheuserspace;soRBENV

Page 22: Better IOS Development with Groovy

DEPENDENCIES

Yourappneedsdependencies

DependenciescanbeinstalledwithCocoapods

Cocoapodsisarubygem

RubygemscanbeinstalledwithBundler

YouWANTrubyintheuserspace;soRBENV

ThereisabrewformulaforRBENV

Page 23: Better IOS Development with Groovy

DEPENDENCIES

Yourappneedsdependencies

DependenciescanbeinstalledwithCocoapods

Cocoapodsisarubygem

RubygemscanbeinstalledwithBundler

YouWANTrubyintheuserspace;soRBENV

ThereisabrewformulaforRBENV

brewisinstalledusingsystemruby

Page 24: Better IOS Development with Groovy

BUILDTOOLSNot10bulletpointstellingyoutopointandclickatthings.

Page 25: Better IOS Development with Groovy
Page 26: Better IOS Development with Groovy

XCODEBUILDxcodebuild \ -scheme Todos \ -workspace Todos.xcworkspace \ -sdk iphonesimulator \ -configuration Debug \ DSTROOT=/Users/rahul/src/Todos/build/dst \ OBJROOT=/Users/rahul/src/Todos/build/obj \ SYMROOT=/Users/rahul/src/Todos/build/sym \ SHARED_PRECOMPS_DIR=/Users/rahul/src/Todos/build/shared \ -destination \ 'platform=iOS Simulator,id=CAB835ED-3EE2-47B6-AD74-C06675651CEF' \ test

Page 27: Better IOS Development with Groovy

XCODEBUILD

Page 28: Better IOS Development with Groovy

XCODEBUILD

Toocomplexcommands-Unrulybashscripts

Page 29: Better IOS Development with Groovy

XCODEBUILD

Toocomplexcommands-Unrulybashscripts

Differenttoolsforbuild,uploadtotestflight,hockeyapp

Page 30: Better IOS Development with Groovy

XCODEBUILD

Toocomplexcommands-Unrulybashscripts

Differenttoolsforbuild,uploadtotestflight,hockeyapp

Verylittledocumentation,verysteeplearningcurve

Page 31: Better IOS Development with Groovy

XCODEBUILD

Toocomplexcommands-Unrulybashscripts

Differenttoolsforbuild,uploadtotestflight,hockeyapp

Verylittledocumentation,verysteeplearningcurve

Whataboutfunctionaltesting?

Page 32: Better IOS Development with Groovy

XCTOOLxctool \ -workspace Todos.xcworkspace \ -sdk iphonesimulator \ -scheme Todos \ test

Page 33: Better IOS Development with Groovy

XCTOOL

Page 34: Better IOS Development with Groovy

XCTOOL

WritteninObjective-C

Page 35: Better IOS Development with Groovy

XCTOOL

WritteninObjective-C

NeedsadvancedknowledgeofObjective-C

Page 36: Better IOS Development with Groovy

XCTOOL

WritteninObjective-C

NeedsadvancedknowledgeofObjective-C

Whataboutfunctionaltesting?

Page 37: Better IOS Development with Groovy

NOMADCLIios profiles:list --team=ABCDE56789ipa build && ipa distribute

Page 38: Better IOS Development with Groovy

NOMADCLI

Page 39: Better IOS Development with Groovy

NOMADCLI

Writteninruby

Page 40: Better IOS Development with Groovy

NOMADCLI

Writteninruby

Greatsupportforcertificates,distributionprofiles

Page 41: Better IOS Development with Groovy

NOMADCLI

Writteninruby

Greatsupportforcertificates,distributionprofiles

GreatsupportfordistributionusingiTunesConnect

Page 42: Better IOS Development with Groovy

NOMADCLI

Writteninruby

Greatsupportforcertificates,distributionprofiles

GreatsupportfordistributionusingiTunesConnect

Whatabouttesting?

Page 43: Better IOS Development with Groovy

WHATWENEED

Page 44: Better IOS Development with Groovy

WHATWENEED

Flexiblebuildsystem

Page 45: Better IOS Development with Groovy

WHATWENEED

Flexiblebuildsystem

Supportfordistribution

Page 46: Better IOS Development with Groovy

WHATWENEED

Flexiblebuildsystem

Supportfordistribution

Supportforfunctionaltesting

Page 47: Better IOS Development with Groovy

WHATWENEED

Flexiblebuildsystem

Supportfordistribution

Supportforfunctionaltesting

Easytoinstall,evenifyou’reanenterprisesoftwarecompany

Page 48: Better IOS Development with Groovy

WHATWENEED

Flexiblebuildsystem

Supportfordistribution

Supportforfunctionaltesting

Easytoinstall,evenifyou’reanenterprisesoftwarecompany

Easytorun

Page 49: Better IOS Development with Groovy

GRADLEXCODEPLUGINbuildscript { repositories { maven { url "https://plugins.gradle.org/m2/" } } dependencies { classpath "gradle.plugin.org.openbakery:xcodePlugin:0.11.3" }}apply plugin: "org.openbakery.xcodeplugin"xcodebuild { workspace = 'Todos.xcworkspace' scheme = 'Todos' target = 'Todos' sdk = 'iphonesimulator'}

Page 50: Better IOS Development with Groovy

GRADLEXCODEPLUGIN./gradlew xcodetest./gradlew appstoreUpload

Page 51: Better IOS Development with Groovy

FUNCTIONALTESTING

Page 52: Better IOS Development with Groovy

UIAUTOMATIONUSINGINSTRUMENTS

RecordandPlayback

DOMTreeaccess

Refactoring

ManagingState

TuneupJS?Bwoken?

Page 53: Better IOS Development with Groovy

APPIUM

BasedonSelenium

ClientsforseverallanguagesincludingJava

Makesyourappstateless

Page 54: Better IOS Development with Groovy

GROOVY+SPOCK

Spock’sexpressivetesting

Groovy’smetaprogrammingtoimproveaccesstoDOM

Page 55: Better IOS Development with Groovy

CONTINUOUSINTEGRATION

Page 56: Better IOS Development with Groovy

JENKINS

CloudbeesrunsaveryoldversionofOSXandXCode.

BringyourownJenkinsand/orBringyourownslaves.

Page 57: Better IOS Development with Groovy

IMMUTABLESLAVES

There’snoDockerforOSX

Butthereisvagrant.[fragment]Kindof

You’rebetteroffmanagingslavesasmutableinstances

Page 58: Better IOS Development with Groovy

TRAVISCI

RecentlyaddedGAsupportforXCode

Can’trunappiumyet.

Page 59: Better IOS Development with Groovy

RESOURCESCode:

Slides:

https://github.com/rahulsom/todos-ios/

http://rahulsom.github.io/springone2gx-ios/

Page 60: Better IOS Development with Groovy

THANKS