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

@@ -79,17 +79,6 @@ final class RemoteControlCoordinator {
/// The device that's controlling us, if any.
private(set) var controllingDevice: DiscoveredDevice?
/// This device's name for display.
var deviceName: String {
get { networkService.deviceName }
set { networkService.deviceName = newValue }
}
/// This device's ID.
var deviceID: String {
networkService.deviceID
}
// MARK: - Dependencies
private let networkService: LocalNetworkService
@@ -337,25 +326,8 @@ final class RemoteControlCoordinator {
}
}
/// Send a command to all connected devices.
func broadcastCommand(_ command: RemoteControlCommand) async {
let commandDesc = String(describing: command).prefix(50)
rcDebug("COMMAND", "Broadcasting: \(commandDesc)")
await networkService.broadcast(command: command)
}
// MARK: - Convenience Commands
/// Send play command to a device.
func play(on device: DiscoveredDevice) async {
await sendCommand(.play, to: device)
}
/// Send pause command to a device.
func pause(on device: DiscoveredDevice) async {
await sendCommand(.pause, to: device)
}
/// Send toggle play/pause command to a device.
func togglePlayPause(on device: DiscoveredDevice) async {
await sendCommand(.togglePlayPause, to: device)
@@ -441,11 +413,6 @@ final class RemoteControlCoordinator {
await sendCommand(.closeVideo, to: device)
}
/// Toggle fullscreen on a device.
func toggleFullscreen(on device: DiscoveredDevice) async {
await sendCommand(.toggleFullscreen, to: device)
}
/// Play next video in queue on a device.
func playNext(on device: DiscoveredDevice) async {
await sendCommand(.playNext, to: device)
@@ -1013,18 +980,6 @@ final class RemoteControlCoordinator {
}
}
private func expandPlayerIfNeeded() {
#if os(iOS) || os(macOS)
let isPiPActive = (playerService?.currentBackend as? MPVBackend)?.isPiPActive ?? false
rcDebug("PLAYER", "expandPlayerIfNeeded - isPiPActive=\(isPiPActive)")
if !isPiPActive {
navigationCoordinator?.expandPlayer()
}
#else
navigationCoordinator?.expandPlayer()
#endif
}
// MARK: - State Broadcasting
private func startStateBroadcast() {