Building Reusable SwiftUI Components
Building Reusable SwiftUI Components

SwiftUI makes it easy to create beautiful UIs in no time, but it is just as easy to end up with a giant view that mixes view code and business logic. Fortunately, Apple gave us some tools to keep the bloat in check and write maintainable and reusable code.

In this tutorial, you will learn how to:

  • refactor an existing SwiftUI view to make it more maintainable,
  • turn it into a reusable SwiftUI component,
  • add event handling,
  • make the view configurable,
  • use SwiftUI’s styling API to apply different designs,
  • add it to the Xcode component library,
  • turn it into a shareable component that can be consumed via Swift Package Manager,
  • and distribute it via GitHub
SwiftUI and Firebase
SwiftUI and Firebase

In this workshop, you will learn how to build a SwiftUI application with Firebase. We will cover the following topics:

  • Data modelling for Firestore
  • Efficiently mapping Firestore data using Swift’s Codable protocol
  • Fetching data from Firestore using snapshot listeners
  • Connecting SwiftUI’s state management system to Firestore to implement real-time sync
  • Securing your user’s data using Firebase Security Rules
  • Signing in your users using Firebase Authentication