metatext/Shared/MetatextApp.swift
Justin Mazzocchi 6f487524dd
Renaming
2020-08-08 18:37:46 -07:00

32 lines
864 B
Swift

// Copyright © 2020 Metabolist. All rights reserved.
import SwiftUI
@main
struct MetatextApp: App {
private let environment: AppEnvironment
init() {
let identityDatabase: IdentityDatabase
do {
try identityDatabase = IdentityDatabase()
} catch {
fatalError("Failed to initialize identity database")
}
environment = AppEnvironment(
URLSessionConfiguration: .default,
identityDatabase: identityDatabase,
defaults: Defaults(userDefaults: .standard),
secrets: Secrets(keychainService: KeychainService(serviceName: "com.metabolist.metatext")),
webAuthSessionType: WebAuthSession.self)
}
var body: some Scene {
WindowGroup {
RootView(viewModel: RootViewModel(environment: environment))
}
}
}