Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SwiftUI In Production

SwiftUI In Production

With the 10.3 release of our iOS PDF SDK, we’re shipping SwiftUI in production. This is a big milestone for us, and an even more interesting one, as our product still supports iOS 12. In this talk I'll explain how we built this feature while also keep things working for iOS 12, and why we picked SwiftUI for it.

Video: https://vimeo.com/536908653

This talk has been made for Swift Heroes 2021.

832ece085bfe2c7c5b0ed6be62d7e675?s=128

Peter Steinberger
PRO

April 16, 2021
Tweet

Transcript

  1. Swi$ Heroes 2021 | Peter Steinberger — @steipete

  2. whoami • Peter Steinberger • Founder @ PSPDFKit • @steipete

    on Twi7er • h7ps:/ /steipete.com/speaking h"ps:/ /twi"er.com/steipete
  3. h"ps:/ /pspd(it.com - The Complete PDF Solu:on You Can Rely

    On
  4. Swi$UI In Produc/on — Swi$ Heroes 2021 | Peter Steinberger

    — @steipete
  5. Swi$UI In Produc/on — Swi$ Heroes 2021 | Peter Steinberger

    — @steipete
  6. Catalyst Se*ngs In Swi0UI h"ps:/ /twi"er.com/steipete/status/1363079081198288898?s=20

  7. Swi$UI In Produc/on — Swi$ Heroes 2021 | Peter Steinberger

    — @steipete
  8. The New Feature: Electronic Signatures Swi$UI In Produc/on — Swi$

    Heroes 2021 | Peter Steinberger — @steipete
  9. Benefits of Swi-UI Swi$UI In Produc/on — Swi$ Heroes 2021

    | Peter Steinberger — @steipete
  10. Mixing with Exis,ng Code Swi$UI In Produc/on — Swi$ Heroes

    2021 | Peter Steinberger — @steipete
  11. Challenges of Swi/UI Swi$UI In Produc/on — Swi$ Heroes 2021

    | Peter Steinberger — @steipete
  12. Presen&ng Popovers on iPhone Swi$UI In Produc/on — Swi$ Heroes

    2021 | Peter Steinberger — @steipete
  13. h"ps:/ /pspd(it.com/blog/2020/popovers-from-swi:ui-uibarbu"on/

  14. Swi$UI In Produc/on — Swi$ Heroes 2021 | Peter Steinberger

    — @steipete
  15. Swi$UI In Produc/on — Swi$ Heroes 2021 | Peter Steinberger

    — @steipete
  16. h"ps:/ /stackoverflow.com/ques5ons/58837007/mul5ple-shee5spresented-doesnt-work-in-swi@ui

  17. h"ps:/ /gist.github.com/steipete/b9f43b455f396a8db764d13eec971e9b

  18. Toolbars in Swi-UI h"ps:/ /github.com/Swi2UIX/Swi2UIX

  19. Swi$UI In Produc/on — Swi$ Heroes 2021 | Peter Steinberger

    — @steipete
  20. SE-0308 h"ps:/ /github.com/apple/swi4-evolu7on/blob/main/proposals/0308-postfix-if-config-expressions.md

  21. Geometry Readers Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000

    Exception Note: EXC_CORPSE_NOTIFY Application Specific Information: abort() called AttributeGraph precondition failure: invalid input index: 2. Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fff677a733a __pthread_kill + 10 1 libsystem_pthread.dylib 0x00007fff67867e60 pthread_kill + 430 2 libsystem_c.dylib 0x00007fff6772e808 abort + 120 3 com.apple.AttributeGraph 0x00007fff41832631 AG::precondition_failure(char const*, ...) + 273 4 com.apple.AttributeGraph 0x00007fff418096a6 AG::Graph::input_value_ref_slow(unsigned int) + 490 5 com.apple.SwiftUI 0x00007fff6a3a0761 RootGeometry.update(context:) + 97 6 com.apple.SwiftUI 0x00007fff6a3a44d8 partial apply for protocol witness for static UntypedAttribute._update(_:graph:attribute:) in conformance RootGeometry + 24 7 com.apple.AttributeGraph 0x00007fff41805bb9 AG::Graph::UpdateStack::update() + 455 h"ps:/ /pdfviewer.io/
  22. h"ps:/ /stackoverflow.com/ques5ons/60868788/precondi5on-failure-invalid-input-index-when-using-geometryreader-in-swiCui-s

  23. ObservableObject on iOS 13 Swi$UI In Produc/on — Swi$ Heroes

    2021 | Peter Steinberger — @steipete
  24. First Responder Swi$UI In Produc/on — Swi$ Heroes 2021 |

    Peter Steinberger — @steipete
  25. h"ps:/ /github.com/siteline/Swi5UI-Introspect

  26. h"ps:/ /github.com/siteline/Swi5UI-Introspect

  27. Scale Factor Loop Swi$UI In Produc/on — Swi$ Heroes 2021

    | Peter Steinberger — @steipete
  28. Wrapping Views Swi$UI In Produc/on — Swi$ Heroes 2021 |

    Peter Steinberger — @steipete
  29. Swi$UI In Produc/on — Swi$ Heroes 2021 | Peter Steinberger

    — @steipete
  30. Retrofi'ng Combine Publisher Swi$UI In Produc/on — Swi$ Heroes 2021

    | Peter Steinberger — @steipete
  31. Swi$UI In Produc/on — Swi$ Heroes 2021 | Peter Steinberger

    — @steipete
  32. Swi$UI In Produc/on — Swi$ Heroes 2021 | Peter Steinberger

    — @steipete
  33. Keyboard Avoidance Swi$UI In Produc/on — Swi$ Heroes 2021 |

    Peter Steinberger — @steipete
  34. Swi$UI In Produc/on — Swi$ Heroes 2021 | Peter Steinberger

    — @steipete
  35. Swi$UI In Produc/on — Swi$ Heroes 2021 | Peter Steinberger

    — @steipete
  36. Swi$UI In Produc/on — Swi$ Heroes 2021 | Peter Steinberger

    — @steipete
  37. Swi$UI In Produc/on — Swi$ Heroes 2021 | Peter Steinberger

    — @steipete
  38. Summarize • State of Swi+UI • Mixing with exis4ng Code

    • Presen4ng Popovers • Toolbar Logic • Geometry Reader (and other) Bugs • Wrapping Views • First Responder SeKng • RetrofiKng Combine Swi$UI In Produc/on — Swi$ Heroes 2021 | Peter Steinberger — @steipete
  39. Thanks! Ques,ons? Swi$UI In Produc/on — Swi$ Heroes 2021 |

    Peter Steinberger — @steipete