Launch Screens and the SwiftUI App Life Cycle on iOS 14

I have decided to rewrite Bouncer from scratch using the latest SwiftUI version available in iOS 14. This includes using the new SwiftUI App Lifecycle, which allows you to skip UIKit entirely, alongside the AppDelegate and Storyboards.

As I got closer to finishing the app, I decided to replace the default (white) Splash Screen with something better, but since there was no Storyboard anymore, I had no idea how.

Read full post “Launch Screens and the SwiftUI App Life Cycle on iOS 14”

Protocols and Combine: Using @Published in your Protocol declaration

The @ObservableObject and @Published property wrappers are the sauce of Combine powered apps. With Combine and SwiftUI, it’s easy to use the @Published wrapper in our ViewModel properties and have the Views automatically update as changes to these happen.

Everything works great until you want to use Protocols to facilitate dependency injection and testing in your Models and ViewModel classes, as we’ve been doing in our regular MVVM apps for the past few years.

Read full post “Protocols and Combine: Using @Published in your Protocol declaration”