better ios development with groovy
TRANSCRIPT
BETTERIOSDEVELOPMENTWITHGROOVY
RahulSomasunderam(@rahulsom)
ABOUTME
WHEREIWORK
WHYIOS?Andwhyatathisconference?
WHATDOESITTAKETOBUILDANIOSAPP?
XCODEORAPPCODE
SWIFTVSOBJECTIVE-C
SWIFTVSOBJECTIVE-C
Tooling
SWIFTVSOBJECTIVE-C
Tooling
Libraries
DEPENDENCYMANAGEMENT
DEPENDENCYMANAGEMENT
Librariesvsframeworks
AndIdon’tmeantransitivedependencies…
DEPENDENCIES
DEPENDENCIES
Yourappneedsdependencies
DEPENDENCIES
Yourappneedsdependencies
DependenciescanbeinstalledwithCocoapods
DEPENDENCIES
Yourappneedsdependencies
DependenciescanbeinstalledwithCocoapods
Cocoapodsisarubygem
DEPENDENCIES
Yourappneedsdependencies
DependenciescanbeinstalledwithCocoapods
Cocoapodsisarubygem
RubygemscanbeinstalledwithBundler
DEPENDENCIES
Yourappneedsdependencies
DependenciescanbeinstalledwithCocoapods
Cocoapodsisarubygem
RubygemscanbeinstalledwithBundler
YouWANTrubyintheuserspace;soRBENV
DEPENDENCIES
Yourappneedsdependencies
DependenciescanbeinstalledwithCocoapods
Cocoapodsisarubygem
RubygemscanbeinstalledwithBundler
YouWANTrubyintheuserspace;soRBENV
ThereisabrewformulaforRBENV
DEPENDENCIES
Yourappneedsdependencies
DependenciescanbeinstalledwithCocoapods
Cocoapodsisarubygem
RubygemscanbeinstalledwithBundler
YouWANTrubyintheuserspace;soRBENV
ThereisabrewformulaforRBENV
brewisinstalledusingsystemruby
BUILDTOOLSNot10bulletpointstellingyoutopointandclickatthings.
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
XCODEBUILD
XCODEBUILD
Toocomplexcommands-Unrulybashscripts
XCODEBUILD
Toocomplexcommands-Unrulybashscripts
Differenttoolsforbuild,uploadtotestflight,hockeyapp
XCODEBUILD
Toocomplexcommands-Unrulybashscripts
Differenttoolsforbuild,uploadtotestflight,hockeyapp
Verylittledocumentation,verysteeplearningcurve
XCODEBUILD
Toocomplexcommands-Unrulybashscripts
Differenttoolsforbuild,uploadtotestflight,hockeyapp
Verylittledocumentation,verysteeplearningcurve
Whataboutfunctionaltesting?
XCTOOLxctool \ -workspace Todos.xcworkspace \ -sdk iphonesimulator \ -scheme Todos \ test
XCTOOL
XCTOOL
WritteninObjective-C
XCTOOL
WritteninObjective-C
NeedsadvancedknowledgeofObjective-C
XCTOOL
WritteninObjective-C
NeedsadvancedknowledgeofObjective-C
Whataboutfunctionaltesting?
NOMADCLIios profiles:list --team=ABCDE56789ipa build && ipa distribute
NOMADCLI
NOMADCLI
Writteninruby
NOMADCLI
Writteninruby
Greatsupportforcertificates,distributionprofiles
NOMADCLI
Writteninruby
Greatsupportforcertificates,distributionprofiles
GreatsupportfordistributionusingiTunesConnect
NOMADCLI
Writteninruby
Greatsupportforcertificates,distributionprofiles
GreatsupportfordistributionusingiTunesConnect
Whatabouttesting?
WHATWENEED
WHATWENEED
Flexiblebuildsystem
WHATWENEED
Flexiblebuildsystem
Supportfordistribution
WHATWENEED
Flexiblebuildsystem
Supportfordistribution
Supportforfunctionaltesting
WHATWENEED
Flexiblebuildsystem
Supportfordistribution
Supportforfunctionaltesting
Easytoinstall,evenifyou’reanenterprisesoftwarecompany
WHATWENEED
Flexiblebuildsystem
Supportfordistribution
Supportforfunctionaltesting
Easytoinstall,evenifyou’reanenterprisesoftwarecompany
Easytorun
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'}
GRADLEXCODEPLUGIN./gradlew xcodetest./gradlew appstoreUpload
FUNCTIONALTESTING
UIAUTOMATIONUSINGINSTRUMENTS
RecordandPlayback
DOMTreeaccess
Refactoring
ManagingState
TuneupJS?Bwoken?
APPIUM
BasedonSelenium
ClientsforseverallanguagesincludingJava
Makesyourappstateless
GROOVY+SPOCK
Spock’sexpressivetesting
Groovy’smetaprogrammingtoimproveaccesstoDOM
CONTINUOUSINTEGRATION
JENKINS
CloudbeesrunsaveryoldversionofOSXandXCode.
BringyourownJenkinsand/orBringyourownslaves.
IMMUTABLESLAVES
There’snoDockerforOSX
Butthereisvagrant.[fragment]Kindof
You’rebetteroffmanagingslavesasmutableinstances
TRAVISCI
RecentlyaddedGAsupportforXCode
Can’trunappiumyet.
RESOURCESCode:
Slides:
https://github.com/rahulsom/todos-ios/
http://rahulsom.github.io/springone2gx-ios/
THANKS