Speed up iOS Development 
 with LLDB Code Injection 
 and Framework Live Preview

Speed up iOS Development 
 with LLDB Code Injection 
 and Framework Live Preview

By JJ Lin @LINE TECHPULSE 2019 https://techpulse.line.me/

2102a6b8760bd6f57f672805723dd83a?s=128

line_developers_tw

December 04, 2019
Tweet

Transcript

  1. None
  2. > ChienJu Lin / LINE Taiwan Engineering Speed up iOS

    Development 
 with LLDB Code Injection 
 and Framework Live Preview
  3. General Development Flow Product Verify Dev Spec Build

  4. Product Verify Dev Spec Build Pain Point - Long Build

    Time
  5. Reduce Number of Times
 To Rebuild Whole App

  6. Build only the module that currently working on Less Compile

    Source Count Only Build the Framework Less Build Time Coordinator Pattern Dependency Injection Framework
  7. > Not embedded/linked by others Clean refactoring might need lots

    of works Tips for Existing Projects Apply Dummy Framework First Easier To Apply, Refactor Afterwards
  8. How To Verify VIEW in Framework?

  9. > No need many scrolls and clicks > Preview with

    different language / device size Interactive Fast Access Preview Under Different Environment SwiftUI / Playground Live Preview > Preview in different view state
  10. How To Verify LOGIC in Framework?

  11. Test Driven Development in Playground To build faster at every

    iteration Unit Tests / TDD are best to verify logic > Unit Test the framework in playground for interactive environment > Move to test target for CI after completion Write Failing Test Make It Pass Refactor
  12. How To Speed Up Whole App Verification?

  13. LLDB Code Injection Modify control flow without rebuild Inject new

    code using LLDB Command
  14. LLDB Code Injection - Example Goal: Inject new view model

    to asynchronously download
  15. LLDB Code Injection - Example 1. Insert breakpoint, enter multi-line

    expression mode
  16. LLDB Code Injection - Example 2. Inject new view model

    code
  17. LLDB Code Injection - Example 3. Execute the injected function

  18. LLDB Code Injection - Example 4. Wait the async task

    to complete. Retrigger the breakpoint, check result & Done.
  19. Framework Code Injection Preview Summary

  20. Reduce Number of Times
 To Rebuild Whole App

  21. Thank You