Remove dead code found by Periphery on all platforms

Delete declarations that Periphery reports unused on every platform that
compiles them (iOS, macOS, tvOS), including nine views used only by their
own previews. Platform-gated code still used on another platform, device-
only MPV render paths, migration models, CloudKit record names, App
Intents metadata and unused parameters are kept.
This commit is contained in:
Arkadiusz Fal
2026-10-08 23:57:56 +02:00
parent 45e19e6536
commit 4770bbe3b9
141 changed files with 14 additions and 4191 deletions

View File

@@ -63,24 +63,6 @@ actor PlayerControlsBackupService {
return presets
}
/// Checks if a valid backup exists.
/// - Returns: True if a valid backup file exists.
func hasValidBackup() async -> Bool {
guard fileManager.fileExists(atPath: backupFileURL.path) else {
return false
}
// Try to decode to verify it's valid
do {
let data = try Data(contentsOf: backupFileURL)
_ = try decoder.decode([LayoutPreset].self, from: data)
return true
} catch {
LoggingService.shared.error("Backup file exists but is invalid: \(error.localizedDescription)")
return false
}
}
/// Attempts to create a recovered preset from corrupted data.
/// - Parameter data: The corrupted data.
/// - Returns: A recovered preset if partial recovery is possible.
@@ -117,16 +99,6 @@ actor PlayerControlsBackupService {
return nil
}
/// Deletes the backup file.
func deleteBackup() async throws {
guard fileManager.fileExists(atPath: backupFileURL.path) else {
return
}
try fileManager.removeItem(at: backupFileURL)
LoggingService.shared.info("Deleted player controls backup")
}
// MARK: - Helpers
private func formattedDate() -> String {