diff options
| author | Christian Cleberg <[email protected]> | 2026-04-21 22:54:40 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-04-21 22:54:40 -0500 |
| commit | e73d58ee5dd43eaeaaa717f7781cc22256df30f0 (patch) | |
| tree | 2eb84058b37f4edfb6cf6ad7205c08a2af374938 /DomainDig/ExportPresenter.swift | |
| parent | 22ecca12b4fe0e0850401754c674632f322d919d (diff) | |
| download | domain-dig-e73d58ee5dd43eaeaaa717f7781cc22256df30f0.tar.gz domain-dig-e73d58ee5dd43eaeaaa717f7781cc22256df30f0.tar.bz2 domain-dig-e73d58ee5dd43eaeaaa717f7781cc22256df30f0.zip | |
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
Diffstat (limited to 'DomainDig/ExportPresenter.swift')
| -rw-r--r-- | DomainDig/ExportPresenter.swift | 6 |
1 files changed, 5 insertions, 1 deletions
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 } |
