Save 37% off PRO during our Black Friday Sale! »

Getting Groovy with iOS Development

Getting Groovy with iOS Development

My talk at GR8ConfUS 2015 that focusses on using tools from the groovy ecosystem for making iOS development easier.

Efd22413d5e0dd52cfcb68813f769952?s=128

Rahul Somasunderam

July 30, 2015
Tweet

Transcript

  1. Getting Groovy with iOS Development Rahul Somasunderam 8 GR Conf

    July 2015
  2. About Me lgtm.in, swaggydoc, ihe-iti ! java, groovy, objective-c !

    @rahulsom
  3. Where I work • We build a Health Information Exchange

    Population Health Tools • Used by 130 Health Systems, 600 Hospitals, 20K physicians • We love Groovy
  4. None
  5. None
  6. None
  7. Square Brackets Square Brackets Everywhere

  8. But Shirley, there's got to be documentation

  9. None
  10. Tools • XCode bad. AppCode good • Objective-C and Swift

    • Dependency Management • Build Tools • Functional Testing
  11. Dependency Management

  12. Ruby got there first. Deal with it!

  13. None
  14. • Your app needs dependencies • Dependencies can be installed

    with Cocoapods • Cocoapods is a ruby gem • Ruby gems can be installed with Bundler • You WANT ruby in the user space; so RBENV • There is a brew formula for RBENV • brew is installed using system ruby
  15. Build Tools

  16. xcodebuild xcodebuild \ -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
  17. xcodebuild • Too complex commands - Unruly bash scripts •

    Different tools for build, upload to testflight, hockeyapp • Very little documentation, very steep learning curve • What about functional testing?
  18. xctool • Written in Objective-C • Needs advanced knowledge of

    Objective-C • What about functional testing?
  19. Nomad CLI • Written in ruby • Great support for

    certificates, distribution profiles • Great support for distribution using iTunesConnect • What about functional testing?
  20. What we need • Flexible build system • Support for

    distribution • Support for functional testing • Easy to install, even if you're an enterprise software company • Easy to run
  21. Gradle Xcode Plugin buildscript { 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' }
  22. • gradle xcodetest • gradle hockeyapp • gradle deploygate •

    gradle appstoreUpload • gradle oclint • gradle cpd • gradle crashlytics
  23. Functional Testing

  24. UIAutomation using Instruments • Record and Playback • DOM Tree

    access • Refactoring • Managing State • Tuneup JS? Bwoken?
  25. Appium • Based on Selenium • Clients for several languages

    including Java • Makes your app stateless
  26. Groovy + Spock • Spock's expressive testing • Groovy's metaprogramming

    to improve access to DOM
  27. None
  28. Code • https://github.com/rahulsom/todos-ios/