Assuming you are using MVVM with SwiftUI, your ViewModel can still refer to FileManager.default.
Or SwiftUI itself can refer to FileManager.default... or you can assign it to a local var in a SwiftUIView, like...
@State private var manager = FileManager.default
FileManager.default is the same thing, wherever you refer to it... (that's the point of a Singleton), so you don't need to pass it in to your View.
You are not really creating the Singleton, you are just referring to it.
Is that what you are asking?
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: