Pro Yearly is on sale from $80 to $50! »

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

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

ChienJu Lin
LINE Taiwan Engineering 7 iOS Developer
https://linedevday.linecorp.com/jp/2019/sessions/S2-8

Be4518b119b8eb017625e0ead20f8fe7?s=128

LINE DevDay 2019

November 21, 2019
Tweet

Transcript

  1. 2019 DevDay Speed Up iOS Development With LLDB Code Injection

    and Framework Live Preview > ChienJu Lin > LINE Taiwan Engineering 7 iOS Developer
  2. General Development Flow Product Verify Dev Spec Build

  3. Pain Point - Long Build Time Product Dev Spec Build

    Verify
  4. Reduce Number of Times
 To Rebuild Whole App

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

    Source Count Only Build the Framework Less Build Time
  6. > 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
  7. How To Verify VIEW in Framework?

  8. > 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
  9. How To Verify LOGIC in Framework?

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

    iteration Write Failing Test Make It Pass Refactor 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
  11. How To Speed Up Whole App Verification?

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

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

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

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

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

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

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

  19. Reduce Number of Times
 To Rebuild Whole App

  20. Thank You