mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-29 03:21:02 +00:00
31 lines
965 B
Swift
31 lines
965 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import SwiftUI
|
|
|
|
@main
|
|
struct MetatextApp: App {
|
|
// swiftlint:disable weak_delegate
|
|
@UIApplicationDelegateAdaptor(AppDelegate.self) private var appDelegate
|
|
// swiftlint:enable weak_delegate
|
|
|
|
private let allIdentitiesService: AllIdentitiesService = {
|
|
let identityDatabase: IdentityDatabase
|
|
|
|
do {
|
|
try identityDatabase = IdentityDatabase()
|
|
} catch {
|
|
fatalError("Failed to initialize identity database")
|
|
}
|
|
|
|
return AllIdentitiesService(identityDatabase: identityDatabase, environment: .live)
|
|
}()
|
|
|
|
var body: some Scene {
|
|
WindowGroup {
|
|
RootView(
|
|
viewModel: RootViewModel(appDelegate: appDelegate,
|
|
allIdentitiesService: allIdentitiesService,
|
|
userNotificationService: UserNotificationService()))
|
|
}
|
|
}
|
|
}
|