From e73d58ee5dd43eaeaaa717f7781cc22256df30f0 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Tue, 21 Apr 2026 22:54:40 -0500 Subject: feat(v2.4.0): add JSON output, CLI foundation, and shared report layer * introduce DomainReport as canonical output model * add JSON export for single and batch results * create DomainReportBuilder for reusable report construction * add CLI target using shared inspection pipeline * refactor services for UI-independent usage * ensure consistency across TXT, CSV, and JSON outputs --- DomainDig/ExportPresenter.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'DomainDig/ExportPresenter.swift') diff --git a/DomainDig/ExportPresenter.swift b/DomainDig/ExportPresenter.swift index 82ec7ae..2dbd1fc 100644 --- a/DomainDig/ExportPresenter.swift +++ b/DomainDig/ExportPresenter.swift @@ -3,10 +3,14 @@ import UIKit enum ExportPresenter { static func share(filename: String, contents: String) { + share(filename: filename, data: Data(contents.utf8)) + } + + static func share(filename: String, data: Data) { let url = FileManager.default.temporaryDirectory.appendingPathComponent(filename) do { - try contents.write(to: url, atomically: true, encoding: .utf8) + try data.write(to: url, options: .atomic) } catch { return } -- cgit v1.2.3