aboutsummaryrefslogtreecommitdiff
path: root/DomainDig/ReleaseNotes.swift
diff options
context:
space:
mode:
Diffstat (limited to 'DomainDig/ReleaseNotes.swift')
-rw-r--r--DomainDig/ReleaseNotes.swift17
1 files changed, 17 insertions, 0 deletions
diff --git a/DomainDig/ReleaseNotes.swift b/DomainDig/ReleaseNotes.swift
new file mode 100644
index 0000000..2cac883
--- /dev/null
+++ b/DomainDig/ReleaseNotes.swift
@@ -0,0 +1,17 @@
+import Foundation
+
+/// Release notes shown in the "What's New" sheet, loaded from the bundled
+/// `ReleaseNotes.json`. No network access — the content ships with the app.
+struct ReleaseNotes: Decodable {
+ let version: String
+ let highlights: [String]
+
+ static func bundled() -> ReleaseNotes? {
+ guard let url = Bundle.main.url(forResource: "ReleaseNotes", withExtension: "json"),
+ let data = try? Data(contentsOf: url),
+ let notes = try? JSONDecoder().decode(ReleaseNotes.self, from: data) else {
+ return nil
+ }
+ return notes
+ }
+}