Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

iOSDevUK Conference- DevOps for iOS Apps

244 views

Published on

This talk has been given at iOSDevUK Conference 2018 about DevOps for iOS apps. iOSDevUK 8 has been organised by Aberystwyth University. This talks covers tips and tricks of speeding of Swift build, test and release process. It also covers App Store Connect API.

Published in: Technology
  • Be the first to comment

iOSDevUK Conference- DevOps for iOS Apps

  1. 1. SHASHIKANT JAGTAP DevOps for iOS Apps iOSDevUK Conference 2018 @Shashikant86 shashikantjagtap.net #iOSDevOps XCBlog (Medium, Apple News and DZone)
  2. 2. 2 • iOS Development Challenges • Basics of DevOps • CI/CD Practices (YNAP) • Speeding Up Swift Builds • App Store Connect API • DevOps Benefits for iOS • Summary TOPICS
  3. 3. 3What are iOS Development Challenges?
  4. 4. 4 Manual Releases are Pain iOS Development Challenges
  5. 5. 5 iOS Development Challenges Lack of Build Automation
  6. 6. 6iOS Development Challenges CI/CD Setup is Hard
  7. 7. 7iOS Development Challenges Lack of Infrastructure Automation
  8. 8. 8iOS Development Challenges Immature Quality Assurance
  9. 9. 9iOS Development Challenges Pull Deployments
  10. 10. 10Hello DevOps Not tooling, Not a Role, It’s Culture
  11. 11. 11DevOps Pillars Systems Thinking Amplifying Feedback Loop Continuous Learning & Experimentation
  12. 12. 12DevOps Pillars for iOS Jira, Slack, Agile Swiftlint, Danger, XCTest, CI, XCUITest, Sketch, Zeplin, Apple Dev Tools, AppStore Connect. New Apple Frameworks & Tools. e.g CreateML, CoreML, App StoreConnect
  13. 13. 13DevOps Engineer: Tools Where is iOS Tooling Here? Image Source: http://jgovernor-media.redmonk.com/jgovernor/files/2017/06/atlassian-marketplace.png
  14. 14. 14 DevOps Practices Collaborative Development Continuous Integration & Delivery (CI/ CD) Infrastructure As Code Build, Test, Release Automation Continuous Testing Continuous Monitoring
  15. 15. 15YNAP Tooling Our Technology Stack at YNAP
  16. 16. 16 Collaborative iOS Development Pairing, Code Reviews, Common Architecture
  17. 17. 17Collaborative iOS Development GitHub Templates, Danger, Swiftlint PR Templates & Codeowners Danger to detect issues Automated Code Reviews with Danger - Swiftlint plugin
  18. 18. 18Build, Test, Release Automation xcodebuild, agvtool, altool, Fastlane tools
  19. 19. 19YNAP - Build Automation Archive App from TravisCI Travis Build Matrix to run parallel builds and conditional archive
  20. 20. 20 YNAP - Build Automation Parallelising Builds and Tests Parallelise Build using Travis CI Build Matrix
  21. 21. 21YNAP - Build Automation Fastlane Slack Notification Fastlane Slack Notification
  22. 22. 22Infrastructure As Code Bash, Ruby, Ansible, Chef
  23. 23. 23Infrastructure As Code- YNAP Travis, Danger, Pod Configuration in repo
  24. 24. 24General iOS CI/CD Options iOS CI/CD Options for Cloud and Self-Hosted
  25. 25. 25YNAP-iOS CI/CD- YNAP Travis CI handles Our CI/CD
  26. 26. 26 iOS Continuous Testing-YNAP Apple’s XCTest framework for all types of testing
  27. 27. 27iOS Continuous Monitoring- YNAP Crashlytics & Fabric for monitoring Apps
  28. 28. 28Xcode 10 & Beyond… What’s New?
  29. 29. 29Speeding up Swift Builds- Tips Swift Build Time https://github.com/fastred/Optimizing-Swift-Build-Times
  30. 30. 30Faster Swift Builds Xcode 10 Understanding Xcode Build Process https://developer.apple.com/videos/play/wwdc2018/415/
  31. 31. 31Faster Swift Builds Xcode 10 Use New Build System- XCBuild
  32. 32. 32 Faster Swift Builds Xcode 10 Understand Build Process & Parallelised Builds Parallelise Builds
  33. 33. 33 Faster Swift Builds Xcode 10 Improve Run Script Phase
  34. 34. 34 Faster Swift Builds Xcode 10 Separate Compilation Mode & Optimization Level
  35. 35. 35 Faster Swift Builds Xcode 10 - Tips Some other things to consider with Xcode 10 Select right Dependency Manager Add Implicit Dependencies Cache Dependencies Code
  36. 36. 36 Faster Tests in Xcode 10 XCTest for Unit, Integration, Network, API, Performance Tests KEEP IT NATIVE
  37. 37. 37 Faster Tests in Xcode 10 Parallelise Tests for speed
  38. 38. 38 Speeding Tests - Tips Limit UITest, Maximise Domain Layer Tests Find right tests to run in parallel Keep Performance Tests Separate Bundle Add Accessibility Identifiers Separate Build Config for Testing Select Powerful CI Mock or Stub Smartly
  39. 39. 39 Faster iOS Releases Automate Build for Continuous Delivery to TestFlight
  40. 40. 40 Speeding Releases- Tips Never Release from Local Xcode. Automate Releases GitFlow or Trunk Based Development Select Right CI Server/ Service Feature Flag TestFlight Regularly Collaborate with Backend
  41. 41. 41 Native Apple Developer CLI Tools xcodebuild:- Analyse, Build, Test and Archive. Security : Manage Keychain PlistBuddy agvtool xcrun tools: simctl xcode-select altool openssl iTMS Transporter
  42. 42. 42 App Store Connect API Talk to App Store Connect with API https://developer.apple.com/videos/play/wwdc2018/303
  43. 43. 43App Store Connect API Manage Certificates, Profiles, Users, Apps, Sales etc api.appstoreconnect.apple.com
  44. 44. 44 Accessing App Store Connect API JWT Tokens needs to be created after every 20 mins Generate JWT Token Generate API Key Get Private Key Access API using JWT Token GET api.appstoreconnect.apple.com/v1/users
  45. 45. 45 What to Expect? Be Prepared To Learn New Wrapper Tools More tools will be there in market. Written on top of App Store Connect API Existing tools will break. Think before investing
  46. 46. 46 Automate in Apple Way Good Bye Third-Party Tools? Finally, we got official API to talk to App Store Connect
  47. 47. 47 Benefits of iOS DevOps DevOps is Sense of Urgency Boost iOS Developer Productivity – Let them Build Features, not Infrastructure Faster feedback on features from everyone – Fail Fast to innovate Faster Deliver before your competitors – Continuous Delivery of Features Shorten Mean Time To Recovery
  48. 48. 48 Summary It’s not too late. Enable DevOps in Your iOS Team Today Common iOS Development problems What is DevOps and how to solve common problems using DevOps DevOps Practices and How to implement in iOS Projects Tips and Tricks to Automate Swift (Build + Test + Release) Process App Store Connect API Benefits of DevOps for iOS Apps
  49. 49. @ynap www.ynap.com YOOX NET-A-PORTER GROUP
  50. 50. @Shashikant86 shashikantjagtap.net About Me: https://www.linkedin.com/in/shashikantjagtap Tweet #iOSDevOps #iOSDevUK

×