1
0
mirror of https://github.com/metabolist/metatext synced 2024-12-20 14:32:48 +01:00
metatext-app-ios-iphone-ipad/System/MetatextApp.swift
2020-08-26 21:25:28 -07:00

32 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()))
}
}
}