Fix 5 build issues: add ButtonStyles to project, actor isolation, buffer mutability
- Re-ran xcodegen so ButtonStyles.swift is included (fixes PrimaryButtonStyle and ScaleButtonStyle not in scope in LoginView and LANTriggerSection) - BackgroundTaskManager: access BackupEngine.shared inside @MainActor Task instead of nonisolated context - SFTPService: change var buffer → let (never mutated) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -37,6 +37,7 @@
|
|||||||
DCE9AF4F0160E323224E3553 /* PhotoLibraryProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74E2AF8B56C469E0D94EFE94 /* PhotoLibraryProtocol.swift */; };
|
DCE9AF4F0160E323224E3553 /* PhotoLibraryProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74E2AF8B56C469E0D94EFE94 /* PhotoLibraryProtocol.swift */; };
|
||||||
DF719EAD5727B335001DB50A /* ConnectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE318B60576B11E80862664D /* ConnectView.swift */; };
|
DF719EAD5727B335001DB50A /* ConnectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE318B60576B11E80862664D /* ConnectView.swift */; };
|
||||||
E830DB3078A8873382A77B63 /* BackupResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4AEFE4959C08B94AE9584A11 /* BackupResult.swift */; };
|
E830DB3078A8873382A77B63 /* BackupResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4AEFE4959C08B94AE9584A11 /* BackupResult.swift */; };
|
||||||
|
ED0D2A1D05B5898BCCE9EA0A /* ButtonStyles.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA0969FC7D7E0EE313E29D55 /* ButtonStyles.swift */; };
|
||||||
F9219423E73718D8AB604EB1 /* ConnectionStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = D87319355D902007618A91AE /* ConnectionStore.swift */; };
|
F9219423E73718D8AB604EB1 /* ConnectionStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = D87319355D902007618A91AE /* ConnectionStore.swift */; };
|
||||||
FA646815F98D36CAB180072A /* BrowseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D947C8F8945A2AB081BBD0EF /* BrowseView.swift */; };
|
FA646815F98D36CAB180072A /* BrowseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D947C8F8945A2AB081BBD0EF /* BrowseView.swift */; };
|
||||||
FDC18499CC21A58C2F6F1BDB /* BackupJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47E762898E351192399FC739 /* BackupJob.swift */; };
|
FDC18499CC21A58C2F6F1BDB /* BackupJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47E762898E351192399FC739 /* BackupJob.swift */; };
|
||||||
@@ -65,8 +66,9 @@
|
|||||||
A8F24C7DD7A503A0D561F3FB /* LoginView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginView.swift; sourceTree = "<group>"; };
|
A8F24C7DD7A503A0D561F3FB /* LoginView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginView.swift; sourceTree = "<group>"; };
|
||||||
AC73AD75762D4357D171CDA4 /* BackupViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackupViewModel.swift; sourceTree = "<group>"; };
|
AC73AD75762D4357D171CDA4 /* BackupViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackupViewModel.swift; sourceTree = "<group>"; };
|
||||||
B36E23852EF12DC14A2DF2DC /* NASBackupApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NASBackupApp.swift; sourceTree = "<group>"; };
|
B36E23852EF12DC14A2DF2DC /* NASBackupApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NASBackupApp.swift; sourceTree = "<group>"; };
|
||||||
C755BFDD42D46A3FB490A4BB /* NASBackup.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NASBackup.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
C755BFDD42D46A3FB490A4BB /* NASBackup.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = NASBackup.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
C955FEF6710E3667C7A73A02 /* ProgressRing.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgressRing.swift; sourceTree = "<group>"; };
|
C955FEF6710E3667C7A73A02 /* ProgressRing.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgressRing.swift; sourceTree = "<group>"; };
|
||||||
|
CA0969FC7D7E0EE313E29D55 /* ButtonStyles.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonStyles.swift; sourceTree = "<group>"; };
|
||||||
D87319355D902007618A91AE /* ConnectionStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConnectionStore.swift; sourceTree = "<group>"; };
|
D87319355D902007618A91AE /* ConnectionStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConnectionStore.swift; sourceTree = "<group>"; };
|
||||||
D947C8F8945A2AB081BBD0EF /* BrowseView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrowseView.swift; sourceTree = "<group>"; };
|
D947C8F8945A2AB081BBD0EF /* BrowseView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrowseView.swift; sourceTree = "<group>"; };
|
||||||
DEBD92D10D70B957192E271F /* SMBService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SMBService.swift; sourceTree = "<group>"; };
|
DEBD92D10D70B957192E271F /* SMBService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SMBService.swift; sourceTree = "<group>"; };
|
||||||
@@ -156,6 +158,7 @@
|
|||||||
3E7F8DE77B7CDC7009B54D63 /* Components */ = {
|
3E7F8DE77B7CDC7009B54D63 /* Components */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
CA0969FC7D7E0EE313E29D55 /* ButtonStyles.swift */,
|
||||||
83C13DD3EB4823AA98D51AF2 /* FolderRow.swift */,
|
83C13DD3EB4823AA98D51AF2 /* FolderRow.swift */,
|
||||||
C955FEF6710E3667C7A73A02 /* ProgressRing.swift */,
|
C955FEF6710E3667C7A73A02 /* ProgressRing.swift */,
|
||||||
8845003C87961174302AC990 /* ToggleRow.swift */,
|
8845003C87961174302AC990 /* ToggleRow.swift */,
|
||||||
@@ -307,6 +310,7 @@
|
|||||||
LastUpgradeCheck = 1500;
|
LastUpgradeCheck = 1500;
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
32316B985B8906FE4CB97730 = {
|
32316B985B8906FE4CB97730 = {
|
||||||
|
DevelopmentTeam = "";
|
||||||
ProvisioningStyle = Automatic;
|
ProvisioningStyle = Automatic;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -349,6 +353,7 @@
|
|||||||
B7DBF1420838AD3397A280B5 /* BackupView.swift in Sources */,
|
B7DBF1420838AD3397A280B5 /* BackupView.swift in Sources */,
|
||||||
A6276840D40211EB446293A9 /* BackupViewModel.swift in Sources */,
|
A6276840D40211EB446293A9 /* BackupViewModel.swift in Sources */,
|
||||||
FA646815F98D36CAB180072A /* BrowseView.swift in Sources */,
|
FA646815F98D36CAB180072A /* BrowseView.swift in Sources */,
|
||||||
|
ED0D2A1D05B5898BCCE9EA0A /* ButtonStyles.swift in Sources */,
|
||||||
DF719EAD5727B335001DB50A /* ConnectView.swift in Sources */,
|
DF719EAD5727B335001DB50A /* ConnectView.swift in Sources */,
|
||||||
C6AAC362F058E7836A91AC30 /* ConnectViewModel.swift in Sources */,
|
C6AAC362F058E7836A91AC30 /* ConnectViewModel.swift in Sources */,
|
||||||
F9219423E73718D8AB604EB1 /* ConnectionStore.swift in Sources */,
|
F9219423E73718D8AB604EB1 /* ConnectionStore.swift in Sources */,
|
||||||
@@ -382,7 +387,6 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CODE_SIGN_ENTITLEMENTS = NASBackup.entitlements;
|
CODE_SIGN_ENTITLEMENTS = NASBackup.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
DEVELOPMENT_TEAM = K8BLMMR883;
|
|
||||||
INFOPLIST_FILE = App/Info.plist;
|
INFOPLIST_FILE = App/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@@ -467,7 +471,6 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CODE_SIGN_ENTITLEMENTS = NASBackup.entitlements;
|
CODE_SIGN_ENTITLEMENTS = NASBackup.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
DEVELOPMENT_TEAM = K8BLMMR883;
|
|
||||||
INFOPLIST_FILE = App/Info.plist;
|
INFOPLIST_FILE = App/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
|
|||||||
@@ -47,9 +47,8 @@ final class BackgroundTaskManager {
|
|||||||
|
|
||||||
private static func handleBackupTask(_ task: BGProcessingTask) {
|
private static func handleBackupTask(_ task: BGProcessingTask) {
|
||||||
scheduleBackup()
|
scheduleBackup()
|
||||||
let engine = BackupEngine.shared
|
task.expirationHandler = { Task { await BackupEngine.shared.cancel() } }
|
||||||
task.expirationHandler = { Task { await engine.cancel() } }
|
Task { @MainActor in
|
||||||
Task {
|
|
||||||
do {
|
do {
|
||||||
let store = ConnectionStore.shared
|
let store = ConnectionStore.shared
|
||||||
guard let connection = store.savedConnection else {
|
guard let connection = store.savedConnection else {
|
||||||
@@ -57,7 +56,7 @@ final class BackgroundTaskManager {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
let filter = store.backupFilter
|
let filter = store.backupFilter
|
||||||
_ = try await engine.run(connection: connection, filter: filter, triggeredByLAN: true)
|
_ = try await BackupEngine.shared.run(connection: connection, filter: filter, triggeredByLAN: true)
|
||||||
task.setTaskCompleted(success: true)
|
task.setTaskCompleted(success: true)
|
||||||
} catch {
|
} catch {
|
||||||
task.setTaskCompleted(success: false)
|
task.setTaskCompleted(success: false)
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ final class SFTPService: NASTransferProtocol {
|
|||||||
filePath: remotePath,
|
filePath: remotePath,
|
||||||
flags: [.write, .create, .truncate]
|
flags: [.write, .create, .truncate]
|
||||||
) { file in
|
) { file in
|
||||||
var buffer = ByteBuffer(data: data)
|
let buffer = ByteBuffer(data: data)
|
||||||
try await file.write(buffer, at: 0)
|
try await file.write(buffer, at: 0)
|
||||||
}
|
}
|
||||||
progress(total, total)
|
progress(total, total)
|
||||||
|
|||||||
Reference in New Issue
Block a user