From fd8ca178a379da71f5bb19c461524888cad9447e Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Fri, 17 Jul 2026 11:18:25 -0500 Subject: v4.8.0: Add scheduled report generation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ScheduledReportService (@MainActor, headless/storage-backed like DomainMonitoringService): builds the latest report for every tracked domain from persisted history, exports it via DomainReportExporter in the configured format (markdown/PDF/JSON), writes it to a local Documents subdirectory, logs the run, and fires a "Scheduled Report Ready" local notification. - ScheduledReportScheduler mirrors DomainMonitoringScheduler's BGTaskScheduler approach with its own task identifier (net.cleberg.DomainDig.report.schedule, added to Info.plist) and a daily/weekly cadence. - ScheduledReportsView (Settings → Scheduled Reports): enable toggle, cadence and format pickers, "Generate Now", and a log of past reports each shareable via the existing ExportPresenter share sheet. - Gated behind the existing .automatedMonitoring capability (Pro), consistent with monitoring being the other background-automation feature. - Settings/logs persist via UserDefaults (DomainExportFormat is now Codable), not DomainDataPortabilityService backup/restore — this is local automation configuration, not user-authored content, same reasoning as v4.7.0's watchlist saved views. --- DomainDig/ContentView.swift | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'DomainDig/ContentView.swift') diff --git a/DomainDig/ContentView.swift b/DomainDig/ContentView.swift index d69cfa3..8f4eada 100644 --- a/DomainDig/ContentView.swift +++ b/DomainDig/ContentView.swift @@ -2716,6 +2716,10 @@ struct SettingsView: View { NavigationLink("Monitoring") { MonitoringSettingsView(viewModel: viewModel) } + + NavigationLink("Scheduled Reports") { + ScheduledReportsView() + } } Section("Data") { -- cgit v1.2.3