1
0
mirror of https://github.com/metabolist/metatext synced 2024-12-18 12:28:35 +01:00
metatext-app-ios-iphone-ipad/Shared/MetatextApp.swift
Justin Mazzocchi 09c518d712
Refactoring
2020-08-03 08:20:51 -07:00

32 lines
856 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,
preferences: Preferences(userDefaults: .standard),
secrets: Secrets(keychain: Keychain(service: "com.metabolist.metatext")),
webAuthSessionType: RealWebAuthSession.self)
}
var body: some Scene {
WindowGroup {
RootView(viewModel: RootViewModel(environment: environment))
}
}
}