X-Git-Url: https://git.r.bdr.sh/rbdr/map/blobdiff_plain/1b85f723b48d38cf345bb9a4f3fd01aa6039b50b..4e7e11cfd56adfa14a557c76e192ff3148cd2842:/Map/MapApp.swift?ds=inline diff --git a/Map/MapApp.swift b/Map/MapApp.swift index 10b6bcb..ef1b119 100644 --- a/Map/MapApp.swift +++ b/Map/MapApp.swift @@ -1,20 +1,17 @@ -// -// MapApp.swift -// Map -// -// Created by Ruben Beltran del Rio on 2/1/21. -// - import SwiftUI +import Sparkle @main struct MapApp: App { - let persistenceController = PersistenceController.shared - - var body: some Scene { - WindowGroup { - ContentView() - .environment(\.managedObjectContext, persistenceController.container.viewContext) - } + + private let updaterController: SPUStandardUpdaterController = SPUStandardUpdaterController(startingUpdater: true, updaterDelegate: nil, userDriverDelegate: nil) + + var body: some Scene { + DocumentGroup(newDocument: MapDocument()) { file in + MapEditor(document: file.$document, url: file.fileURL) + }.commands { + MapCommands() + UpdateCommands(updaterController: updaterController) } + } }