Files
Termind/TFI/Platform/TerminalNotificationPlatform.swift
T
Kaede Akino 632d913bb3 feat(terminal): add device-local experience preferences
Add local Bell and screen-awake controls with per-session bell observation and scene-aware effects. Provide foreground Connection Journey success haptics independent of terminal preferences.

Replace the notification sound with an original bell resource, make AudioToolbox completion queue-safe, and group mobile theme settings.
2026-10-17 02:20:38 +08:00

20 lines
565 B
Swift

import UIKit
@MainActor
enum TerminalNotificationPlatform {
static var soundURL: URL? { Bundle.main.url(forResource: "bell", withExtension: "wav") }
static func ringBell() {
guard ProcessInfo.processInfo.environment["XCTestConfigurationFilePath"] == nil,
let url = soundURL
else { return }
MobileSystemSoundPlayer.live.play(url: url)
}
static func openSettings() {
if let url = URL(string: UIApplication.openNotificationSettingsURLString) {
UIApplication.shared.open(url)
}
}
}