Chapter 8: Saving Settings.
I’m trying to print the document directory by adding .onAppear modifier but nothing is printed on the console.
import SwiftUI
@main
struct HIITFitApp: App {
var body: some Scene {
WindowGroup {
ContentView()
.onAppear {
print(FileManager.default.urls(for: .documentDirectory, in: .userDomainMask))
}
}
}