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

@@ -55,7 +55,6 @@ struct AccountSyncTests {
}
private struct Harness {
let defaults: UserDefaults
let accounts: AccountsManager
let store: AccountSyncStore
let coordinator: AccountSyncCoordinator
@@ -109,7 +108,6 @@ struct AccountSyncTests {
coordinator.attach(database: nil) { recorder.record($0) }
return Harness(
defaults: defaults,
accounts: accounts,
store: store,
coordinator: coordinator,
@@ -1152,7 +1150,6 @@ struct AccountSyncTests {
let scope: CredentialIdentityScope
let instances: InstancesManager
let accounts: AccountsManager
let store: AccountSyncStore
let coordinator: AccountSyncCoordinator
/// Held for the length of the test: the manager's activation hook
/// only borrows it.
@@ -1261,7 +1258,6 @@ struct AccountSyncTests {
scope: scope,
instances: instances,
accounts: accounts,
store: store,
coordinator: coordinator,
importer: importer,
recorder: recorder,

View File

@@ -231,7 +231,6 @@ private final class DeletionOrderStore: AccountCredentialsManager {
self.accountsManager = accountsManager
}
var loggedInAccountIDs: Set<UUID> { [] }
var isScopeResolved: Bool { true }
func setCredential(_: String, for _: Account) {}
@@ -245,7 +244,6 @@ private final class DeletionOrderStore: AccountCredentialsManager {
func migrateCredential(forAccountID _: UUID, fromScope _: String) -> Bool { true }
func deleteCredential(forAccountID _: UUID, inScope _: String) -> Bool { true }
func resyncCredentialsWithCurrentSetting() {}
func setUsername(_: String, for _: Account) {}
func username(for _: Account) -> String? { nil }
func isLoggedIn(for _: Account) -> Bool { false }

View File

@@ -26,12 +26,6 @@ enum IntegrationTestConstants {
/// Rick Astley's channel ID.
static let testChannelID = "UCuAXFkgsw1L7xaCfnd5JJOw"
/// A popular music playlist ID.
static let testPlaylistID = "PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf"
/// A stable search query.
static let testSearchQuery = "never gonna give you up"
/// Timeout for network requests (30 seconds).
static let networkTimeout: TimeInterval = 30
}

View File

@@ -849,7 +849,6 @@ private final class TestCredentialsManager: AccountCredentialsManager {
)
}
var loggedInAccountIDs: Set<UUID> { credentials.loggedInAccountIDs }
var isScopeResolved: Bool { credentials.isScopeResolved }
func setCredential(_ credential: String, for account: Account) {
@@ -864,8 +863,6 @@ private final class TestCredentialsManager: AccountCredentialsManager {
credentials.deleteCredential(forAccountID: accountID)
}
func resyncCredentialsWithCurrentSetting() { credentials.resyncCredentialsWithCurrentSetting() }
func setUsername(_ username: String, for account: Account) {
credentials.setUsername(username, for: account)
}
@@ -916,14 +913,12 @@ private final class FlakyCredentialsManager: AccountCredentialsManager {
private(set) var migrateCalls = 0
private(set) var deleteCalls = 0
var loggedInAccountIDs: Set<UUID> { [] }
var isScopeResolved: Bool { true }
func setCredential(_: String, for _: Account) {}
func credential(for _: Account) -> String? { nil }
func deleteCredential(for _: Account) {}
func deleteCredential(forAccountID _: UUID) {}
func resyncCredentialsWithCurrentSetting() {}
func setUsername(_: String, for _: Account) {}
func username(for _: Account) -> String? { nil }
func isLoggedIn(for _: Account) -> Bool { false }