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:
@@ -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") ?? ""
|
||||
}
|
||||
|
||||
|
||||
@@ -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 }
|
||||
|
||||
16
SilverApple/Hardening/Views/HardeningListView.swift
Normal file
16
SilverApple/Hardening/Views/HardeningListView.swift
Normal 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")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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")
|
||||
|
||||
29
SilverApple/Settings/Views/ServerConfigView.swift
Normal file
29
SilverApple/Settings/Views/ServerConfigView.swift
Normal 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")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user