diff options
| author | Christian Cleberg <[email protected]> | 2026-05-14 12:41:55 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-05-14 12:41:55 -0500 |
| commit | 0d61e05e98f6f020722ee4d43f024c1da348d2a9 (patch) | |
| tree | b388972b86cf83de380381c52c4390c3beafc69a /Hutch/App/HutchApp.swift | |
| parent | f28e5cee1643e3f99d7bf90476d1dcf9347229a0 (diff) | |
| download | hutch-3.4.0.tar.gz hutch-3.4.0.tar.bz2 hutch-3.4.0.zip | |
feat: add Safari extension for sourcehut deep linksv3.4.0
Diffstat (limited to 'Hutch/App/HutchApp.swift')
| -rw-r--r-- | Hutch/App/HutchApp.swift | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Hutch/App/HutchApp.swift b/Hutch/App/HutchApp.swift index 9c643d9..69d1311 100644 --- a/Hutch/App/HutchApp.swift +++ b/Hutch/App/HutchApp.swift @@ -1,7 +1,9 @@ import SwiftUI +import os @main struct HutchApp: App { + private let deepLinkLogger = Logger(subsystem: "net.cleberg.Hutch", category: "DeepLink") @State private var appState = AppState() @State private var networkMonitor = NetworkMonitor() @AppStorage(AppStorageKeys.appTheme, store: .standard) private var appTheme: AppTheme = .system @@ -18,8 +20,12 @@ struct HutchApp: App { .background(appTheme == .amoled ? Color.black : Color.clear) .preferredColorScheme(appTheme.colorScheme) .onOpenURL { url in + deepLinkLogger.info("Received URL: \(url.absoluteString, privacy: .public)") if let link = DeepLink(url: url) { + deepLinkLogger.info("Parsed deep link: \(String(describing: link), privacy: .public)") appState.pendingDeepLink = link + } else { + deepLinkLogger.error("Rejected URL: \(url.absoluteString, privacy: .public)") } } .onChange(of: HutchIntentNavigator.shared.pendingDestination) { _, destination in |
