From 5aa2503e695022fbcfc7556a8c9f17a95e009138 Mon Sep 17 00:00:00 2001 From: Ethan Dickson Date: Thu, 29 Oct 2026 17:04:19 +1100 Subject: [PATCH 1/2] fix: build with Xcode 27 --- .../Coder-Desktop/VPN/VPNSystemExtension.swift | 2 +- Coder-Desktop/Coder-Desktop/Views/ButtonRow.swift | 12 ++++++------ Coder-Desktop/Coder-Desktop/Views/Util.swift | 2 +- Coder-Desktop/CoderSDK/HTTP.swift | 2 +- Coder-Desktop/CoderSDK/UserAgent.swift | 2 +- Coder-Desktop/VPNLibTests/CoderRouterTests.swift | 2 +- Coder-Desktop/VPNLibTests/SpeakerTests.swift | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Coder-Desktop/Coder-Desktop/VPN/VPNSystemExtension.swift b/Coder-Desktop/Coder-Desktop/VPN/VPNSystemExtension.swift index 2bd97dbc..9ff974ca 100644 --- a/Coder-Desktop/Coder-Desktop/VPN/VPNSystemExtension.swift +++ b/Coder-Desktop/Coder-Desktop/VPN/VPNSystemExtension.swift @@ -2,7 +2,7 @@ import Foundation import os import SystemExtensions -enum SystemExtensionState: Equatable, Sendable { +enum SystemExtensionState: Equatable { case uninstalled case needsUserApproval case installed diff --git a/Coder-Desktop/Coder-Desktop/Views/ButtonRow.swift b/Coder-Desktop/Coder-Desktop/Views/ButtonRow.swift index 9dbb916c..fd8e8ce3 100644 --- a/Coder-Desktop/Coder-Desktop/Views/ButtonRow.swift +++ b/Coder-Desktop/Coder-Desktop/Views/ButtonRow.swift @@ -1,19 +1,19 @@ import SwiftUI struct ButtonRowView: View { - init(highlightColor: Color = .accentColor, isSelected: Bool = false, label: @escaping () -> Label) { + init(highlightColor: Color = .accentColor, isSelected: Bool = false, @ViewBuilder label: () -> Label) { self.highlightColor = highlightColor - self.isSelected = isSelected - self.label = label + _isSelected = State(initialValue: isSelected) + self.label = label() } let highlightColor: Color - @State private var isSelected: Bool = false - @ViewBuilder var label: () -> Label + @State private var isSelected: Bool + let label: Label var body: some View { HStack(spacing: 0) { - label() + label Spacer() } .padding(.horizontal, Theme.Size.trayPadding) diff --git a/Coder-Desktop/Coder-Desktop/Views/Util.swift b/Coder-Desktop/Coder-Desktop/Views/Util.swift index af25a915..b9e78b80 100644 --- a/Coder-Desktop/Coder-Desktop/Views/Util.swift +++ b/Coder-Desktop/Coder-Desktop/Views/Util.swift @@ -55,7 +55,7 @@ private struct ActivationPolicyModifier: ViewModifier { NSApp.setActivationPolicy(.regular) } .onDisappear { - if NSApp.windows.filter({ $0.level != .statusBar && $0.isVisible }).count <= 1 { + if NSApp.windows.count(where: { $0.level != .statusBar && $0.isVisible }) <= 1 { NSApp.setActivationPolicy(.accessory) } } diff --git a/Coder-Desktop/CoderSDK/HTTP.swift b/Coder-Desktop/CoderSDK/HTTP.swift index 87691c74..802eafd5 100644 --- a/Coder-Desktop/CoderSDK/HTTP.swift +++ b/Coder-Desktop/CoderSDK/HTTP.swift @@ -15,7 +15,7 @@ public struct HTTPHeader: Sendable, Codable { } } -enum HTTPMethod: String, Equatable, Hashable, Sendable { +enum HTTPMethod: String, Equatable, Hashable { case get = "GET" case post = "POST" case delete = "DELETE" diff --git a/Coder-Desktop/CoderSDK/UserAgent.swift b/Coder-Desktop/CoderSDK/UserAgent.swift index 9b55bfa9..35797ba1 100644 --- a/Coder-Desktop/CoderSDK/UserAgent.swift +++ b/Coder-Desktop/CoderSDK/UserAgent.swift @@ -7,7 +7,7 @@ public enum CoderComponent: String, Sendable { } /// Go's `GOARCH` spelling, so a single pattern matches the CLI, the vpn-daemon and Desktop client. -enum GoArch: String, Sendable { +enum GoArch: String { case arm64 case amd64 } diff --git a/Coder-Desktop/VPNLibTests/CoderRouterTests.swift b/Coder-Desktop/VPNLibTests/CoderRouterTests.swift index c4df5a12..533ab922 100644 --- a/Coder-Desktop/VPNLibTests/CoderRouterTests.swift +++ b/Coder-Desktop/VPNLibTests/CoderRouterTests.swift @@ -12,7 +12,7 @@ struct CoderRouterTests { router = CoderRouter() } - struct RouteTestCase: CustomStringConvertible, Sendable { + struct RouteTestCase: CustomStringConvertible { let urlString: String let expectedRoute: CoderRoute? let description: String diff --git a/Coder-Desktop/VPNLibTests/SpeakerTests.swift b/Coder-Desktop/VPNLibTests/SpeakerTests.swift index 67d7fa46..f4a1ef3e 100644 --- a/Coder-Desktop/VPNLibTests/SpeakerTests.swift +++ b/Coder-Desktop/VPNLibTests/SpeakerTests.swift @@ -3,7 +3,7 @@ import Testing @testable import VPNLib @Suite(.timeLimit(.minutes(1))) -struct SpeakerTests: Sendable { +struct SpeakerTests { let pipeMT = Pipe() let pipeTM = Pipe() let uut: Speaker @@ -121,7 +121,7 @@ struct SpeakerTests: Sendable { } @Suite(.timeLimit(.minutes(1))) -struct ManagerSpeakerTests: Sendable { +struct ManagerSpeakerTests { let pipeMT = Pipe() let pipeTM = Pipe() let queue: DispatchQueue = .global(qos: .utility) From 987a1db9b37fd4aba5d6a5388bab79662f06d976 Mon Sep 17 00:00:00 2001 From: Ethan Dickson Date: Mon, 2 Nov 2026 07:34:48 +0000 Subject: [PATCH 2/2] chore: set the app category to Developer Tools Xcode warns "No App Category is set for target 'Coder Desktop'" on every build. Set LSApplicationCategoryType through the generated Info.plist, the same way we set LSUIElement. --- Coder-Desktop/project.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/Coder-Desktop/project.yml b/Coder-Desktop/project.yml index 7833a810..bcc80520 100644 --- a/Coder-Desktop/project.yml +++ b/Coder-Desktop/project.yml @@ -173,6 +173,7 @@ targets: DEVELOPMENT_ASSET_PATHS: '"Coder-Desktop/Preview Content"' # Adds development assets. ENABLE_HARDENED_RUNTIME: YES ENABLE_PREVIEWS: YES + INFOPLIST_KEY_LSApplicationCategoryType: "public.app-category.developer-tools" INFOPLIST_KEY_LSUIElement: YES INFOPLIST_KEY_NSHumanReadableCopyright: "" SWIFT_EMIT_LOC_STRINGS: YES