-//
-// 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()
}
+ }
}