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.

Peter Steinberger

April 16, 2021
Tweet

More Decks by Peter Steinberger

Other Decks in Programming

Transcript

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

    on Twi7er • h7ps:/ /steipete.com/speaking h"ps:/ /twi"er.com/steipete
  2. The New Feature: Electronic Signatures Swi$UI In Produc/on — Swi$

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

    2021 | Peter Steinberger — @steipete
  4. 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/
  5. 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