- Adaptive iPhone/iPad layout with NavigationSplitView sidebar - Auto-detect SSL-pinned domains, fall back to passthrough - Certificate install via local HTTP server (Safari profile flow) - App Group-backed CA, per-domain leaf cert LRU cache - DB-backed config repository, Darwin notification throttling - Rules engine, breakpoint rules, pinned domain tracking - os.Logger instrumentation across tunnel/proxy/mitm/capture/cert/rules/db/ipc/ui - Fix dyld framework embed, race conditions, thread safety
49 lines
1.6 KiB
Swift
49 lines
1.6 KiB
Swift
import SwiftUI
|
|
import ProxyCore
|
|
|
|
struct AppSettingsView: View {
|
|
@AppStorage("analyticsEnabled") private var analyticsEnabled = false
|
|
@AppStorage("crashReportingEnabled") private var crashReportingEnabled = true
|
|
@State private var showClearCacheConfirmation = false
|
|
|
|
private var appVersion: String {
|
|
Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "Unknown"
|
|
}
|
|
|
|
private var buildNumber: String {
|
|
Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? "Unknown"
|
|
}
|
|
|
|
var body: some View {
|
|
Form {
|
|
Section {
|
|
Toggle("Analytics", isOn: $analyticsEnabled)
|
|
Toggle("Crash Reporting", isOn: $crashReportingEnabled)
|
|
} footer: {
|
|
Text("Help improve the app by sharing anonymous usage data.")
|
|
}
|
|
|
|
Section {
|
|
Button("Clear App Cache", role: .destructive) {
|
|
showClearCacheConfirmation = true
|
|
}
|
|
} footer: {
|
|
Text("Remove all cached data. This does not delete captured traffic.")
|
|
}
|
|
|
|
Section("About") {
|
|
LabeledContent("Version", value: appVersion)
|
|
LabeledContent("Build", value: buildNumber)
|
|
}
|
|
}
|
|
.navigationTitle("App Settings")
|
|
.confirmationDialog("Clear Cache", isPresented: $showClearCacheConfirmation) {
|
|
Button("Clear Cache", role: .destructive) {
|
|
URLCache.shared.removeAllCachedResponses()
|
|
}
|
|
} message: {
|
|
Text("This will clear all cached data.")
|
|
}
|
|
}
|
|
}
|