Controlling the SwiftUI App Startup

Photo by Abraham Barrera on Unsplash

Some time ago, I struggled with controlling the App startup process, in order to achieve a defined setup during test execution — for instance, not to have the default database active.

As a newbie to SwiftUI, the solution may not be obvious at first sight. However, because it’s pretty simple, I’d like to share with you here.