Private
Public Access
1
0

fix(build): resolve Xcode 26 compilation errors

- Add ServerConfigView stub (referenced in SilverAppleApp.swift)
- Add HardeningListView stub (referenced in DashboardView.swift)
- Fix .accentColor → Color.accentColor (ShapeStyle removed member)
- Fix withCheckedThrowingContinuation explicit type annotation
- Make AppEnvironment.serverUrl internal for ServerConfigView access

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-05 12:13:04 +01:00
parent de514fc425
commit 9073a51787
5 changed files with 48 additions and 3 deletions

View File

@@ -12,7 +12,7 @@ final class AppEnvironment: ObservableObject {
let apiClient: SilverAPIClient
let mdmService: MDMEnrollmentService
private var serverUrl: String {
var serverUrl: String {
UserDefaults.standard.string(forKey: "silverapple.serverUrl") ?? ""
}

View File

@@ -28,7 +28,7 @@ final class PassportAuthService: NSObject, ObservableObject, ASWebAuthentication
let authUrl = buildAuthURL(challenge: challenge)
let callbackUrl = try await withCheckedThrowingContinuation { continuation in
let callbackUrl: URL = try await withCheckedThrowingContinuation { (continuation: CheckedContinuation<URL, any Error>) in
let session = ASWebAuthenticationSession(url: authUrl, callbackURLScheme: "silverapple") { url, error in
if let error { continuation.resume(throwing: error); return }
guard let url else { continuation.resume(throwing: AuthError.noCallback); return }

View File

@@ -0,0 +1,16 @@
import SwiftUI
struct HardeningListView: View {
var body: some View {
NavigationStack {
List {
Section {
Label("Privacy hardening checks coming soon.", systemImage: "lock.shield")
.foregroundStyle(.secondary)
.font(.subheadline)
}
}
.navigationTitle("Hardening")
}
}
}

View File

@@ -15,7 +15,7 @@ struct MDMEnrollmentView: View {
VStack(spacing: 32) {
Image(systemName: "iphone.badge.play")
.font(.system(size: 56))
.foregroundStyle(.accentColor)
.foregroundStyle(Color.accentColor)
VStack(spacing: 12) {
Text("Device Management")

View File

@@ -0,0 +1,29 @@
import SwiftUI
struct ServerConfigView: View {
@EnvironmentObject var env: AppEnvironment
var body: some View {
NavigationStack {
List {
Section("Server") {
HStack {
Text("URL")
Spacer()
Text(env.serverUrl.isEmpty ? "Not configured" : env.serverUrl)
.foregroundStyle(.secondary)
.lineLimit(1)
.truncationMode(.middle)
}
}
Section {
Button("Sign Out", role: .destructive) {
env.authService.signOut()
}
}
}
.navigationTitle("Settings")
}
}
}