// // FocaleApp.swift // Focale // // Author: Simon-Pierre Boucher // Contact: contact@spboucher.ai // import SwiftData import SwiftUI @main struct FocaleApp: App { @State private var app: AppModel init() { let model = AppModel() _app = State(initialValue: model) // BGTask registration must happen before the app finishes launching. IndexScheduler.shared.register(pipeline: model.indexPipeline) } var body: some Scene { WindowGroup { RootView() .environment(app) .preferredColorScheme(.dark) .tint(DesignTokens.accent) } .modelContainer(IndexStore.container) } }