Initial scaffold — NASBackup iOS app

Full project scaffold: XcodeGen project.yml, Core models/protocols/errors,
SMBService (kishikawakatsumi/SMBClient), SFTPService (Citadel 0.9.2),
PhotoLibraryService, LANMonitor, BackupEngine, BackgroundTaskManager,
all feature UIs (Login, Connect, Browse, Backup, History, Settings),
Shared components and theme. Builds clean with zero errors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Robin Kutesa
2026-05-15 17:05:04 +03:00
commit b96711c535
44 changed files with 3412 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
import Foundation
enum BackupError: LocalizedError {
case connectionFailed(String)
case authenticationFailed
case photoLibraryDenied
case uploadFailed(String, underlying: Error)
case directoryListFailed(String)
case directoryCreateFailed(String)
case cancelled
case timeout
case networkUnavailable
var errorDescription: String? {
switch self {
case .connectionFailed(let host): return "Could not connect to \(host)"
case .authenticationFailed: return "Authentication failed — check username and password"
case .photoLibraryDenied: return "Photos access denied — update in iOS Settings"
case .uploadFailed(let file, _): return "Failed to upload \(file)"
case .directoryListFailed(let path):return "Could not list \(path)"
case .directoryCreateFailed(let p): return "Could not create folder at \(p)"
case .cancelled: return "Backup was cancelled"
case .timeout: return "Operation timed out"
case .networkUnavailable: return "Network not available"
}
}
}