Default Tamer automatically discovers all installed browsers on your Mac by querying macOS LaunchServices. The system maintains a cached list of browsers for performance, with intelligent background refresh to stay up-to-date.
Discovering browsers via LaunchServices is relatively expensive (can take 100-500ms). To maintain a snappy user experience, Default Tamer implements an intelligent caching system.
Performance: The cache expires after 24 hours, but browsers are refreshed in the background on each app launch. This ensures the list stays current without impacting responsiveness.
Default Tamer supports opening URLs in private mode for browsers that support command-line arguments:
// BrowserManager.swift:394-418private func getPrivateModeArguments(for bundleId: String) -> [String] { switch bundleId { case BundleIdentifiers.chrome: return ["--args", "--incognito"] case BundleIdentifiers.firefox: return ["--args", "-private-window"] case BundleIdentifiers.edge: return ["--args", "-inprivate"] case BundleIdentifiers.brave: return ["--args", "--incognito"] case BundleIdentifiers.opera: return ["--args", "--private"] case BundleIdentifiers.vivaldi: return ["--args", "--incognito"] case BundleIdentifiers.safari: // Safari requires AppleScript, not supported via CLI return [] case BundleIdentifiers.arc: // Arc doesn't have CLI private mode support return [] default: // Unknown browser - try generic Chromium flag return ["--args", "--incognito"] }}
Browser Support: Safari and Arc don’t support private mode via command-line arguments. URLs will open in normal mode for these browsers even if the rule specifies private mode.
// BrowserManager.swift:503-514func requestSetAsDefault() -> Bool { guard let bundleId = Bundle.main.bundleIdentifier else { return false } // Set as default for http LSSetDefaultHandlerForURLScheme("http" as CFString, bundleId as CFString) // Set as default for https LSSetDefaultHandlerForURLScheme("https" as CFString, bundleId as CFString) return true}
User Consent: On macOS 12 (Monterey) and later, changing the default browser requires explicit user approval through a system dialog. The LSSetDefaultHandlerForURLScheme call will trigger this dialog.
Default Tamer defines specific error types for browser operations:
// BrowserManager.swift:13-44enum BrowserError: LocalizedError { case notInstalled(bundleId: String) case notAccessible(bundleId: String) case openFailed(bundleId: String, underlying: Error) case noFallbackAvailable var errorDescription: String? { switch self { case .notInstalled(let bundleId): return "Browser '\(bundleId)' is not installed" case .notAccessible(let bundleId): return "Browser '\(bundleId)' cannot be accessed" case .openFailed(let bundleId, let error): return "Failed to open URL with '\(bundleId)': \(error.localizedDescription)" case .noFallbackAvailable: return "No fallback browser available" } } var recoverySuggestion: String? { switch self { case .notInstalled: return "Please install the browser or update your routing rules." case .notAccessible: return "Check that the browser is properly installed with necessary permissions." case .openFailed: return "Try opening the URL manually or use a different browser." case .noFallbackAvailable: return "Please install Safari or Chrome to use as a fallback browser." } }}
Not Installed
Browser’s bundle ID is not registered with LaunchServices
Not Accessible
Browser app exists but file cannot be accessed (permissions issue)
Open Failed
NSWorkspace failed to open the URL (may include underlying system error)
No Fallback
Neither target nor fallback browser is available (rare)