X-Git-Url: https://git.r.bdr.sh/rbdr/map/blobdiff_plain/1b85f723b48d38cf345bb9a4f3fd01aa6039b50b..9acbbf34f8183ead1f2a12e60ecb919d5b3fec07:/Map/MapApp.swift?ds=sidebyside diff --git a/Map/MapApp.swift b/Map/MapApp.swift index 10b6bcb..9aff010 100644 --- a/Map/MapApp.swift +++ b/Map/MapApp.swift @@ -1,20 +1,12 @@ -// -// MapApp.swift -// Map -// -// Created by Ruben Beltran del Rio on 2/1/21. -// - import SwiftUI @main struct MapApp: App { - let persistenceController = PersistenceController.shared - - var body: some Scene { - WindowGroup { - ContentView() - .environment(\.managedObjectContext, persistenceController.container.viewContext) - } + var body: some Scene { + DocumentGroup(newDocument: MapDocument()) { file in + MapEditor(document: file.$document, url: file.fileURL) + }.commands { + MapCommands() } + } }