From c843d34f56c207abcf4b93e424125eea2dc601e0 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Fri, 4 Jul 2025 17:06:28 +0200 Subject: Upgrade to Swift 6 --- Map/Data/MapDocument.swift | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'Map/Data/MapDocument.swift') diff --git a/Map/Data/MapDocument.swift b/Map/Data/MapDocument.swift index 1b43efb..3c6d352 100644 --- a/Map/Data/MapDocument.swift +++ b/Map/Data/MapDocument.swift @@ -16,7 +16,7 @@ import SwiftUI import UniformTypeIdentifiers extension UTType { - static var exampleText: UTType { + static var wmap: UTType { UTType(importedAs: "systems.tranquil.map.wmap") } } @@ -24,11 +24,23 @@ extension UTType { struct MapDocument: FileDocument { var text: String - init(text: String = "Hello, world!") { + init( + text: String = """ + Anchor (60, 5) [x] + Node A (78, 23) + Node B (40, 30) [square] + Node C (65, 70) + + Anchor -> Node A + Anchor -> Node B + Node A -> Node C + Node B -> Node C + """ + ) { self.text = text } - static var readableContentTypes: [UTType] { [.exampleText] } + static var readableContentTypes: [UTType] { [.wmap] } init(configuration: ReadConfiguration) throws { guard let data = configuration.file.regularFileContents, -- cgit