mirror of
https://github.com/insidegui/VirtualBuddy.git
synced 2026-12-02 01:39:39 +08:00
* Automatic provisioning of Mac apps launched via Xcode * Improve Xcode integration sheet UI * Security: harden local debugging socket and Xcode tool usage * Soften rule around Xcode MCP use and xcodebuild prohibition * Security: harden App Store Connect API key storage and access * Fix debugged app incorrectly detected as not provisioned due to wildcard matching in provisioning profile * Add previews for provisioning and debugging UI elements * Disambiguate virtual machine vs. host Mac in provisioning and signing team management UIs * Make Xcode debugging setup accessible from the Guest menu * Completely disable debugging socket when developer features disabled, fix socket dying on accept failure * Add versioning to scheme bindings, refer to VirtualBuddy components by a stable symlinked location, store scheme URLs so that app can potentially migrate schemes in the future * Delay showing provisioning sheet so that an app that's already provisioned for the VM doesn't trigger it
48 lines
1.8 KiB
Swift
48 lines
1.8 KiB
Swift
import MacDebugHost
|
|
import SwiftUI
|
|
import VirtualCore
|
|
import ManagedPreferencesUI
|
|
|
|
struct DeveloperSettingsView: View {
|
|
@Binding var isEnabled: Bool
|
|
var keys: any RegistrationKeyStore = XcodeProvisioningController.shared.keys
|
|
var cache: DebugSymbolCache = VirtualBuddyDebugging.symbolCache
|
|
|
|
@ManagedValue(for: .disableDeveloperFeatures, schema: VirtualBuddyManagedPreferences.schema, default: false)
|
|
private var developerFeaturesDisabled: Bool
|
|
|
|
var body: some View {
|
|
SettingsPane {
|
|
SettingsRow("Xcode debugging:") {
|
|
Toggle("Enable developer features", isOn: developerFeaturesDisabled ? .constant(false) : $isEnabled)
|
|
.disabled(developerFeaturesDisabled)
|
|
|
|
if developerFeaturesDisabled {
|
|
ManagedRestrictionBannerView(title: "Developer features are disabled by your organization.")
|
|
} else {
|
|
SettingsCaption("Run and debug macOS apps from Xcode in your virtual machines.")
|
|
}
|
|
}
|
|
|
|
if isEnabled && !developerFeaturesDisabled {
|
|
SettingsDivider()
|
|
DeviceRegistrationSettings(keys: keys)
|
|
}
|
|
DebugCacheSettings(showWhenEmpty: isEnabled && !developerFeaturesDisabled, cache: cache)
|
|
}
|
|
.task { cache.reload() }
|
|
}
|
|
}
|
|
|
|
#if DEBUG
|
|
#Preview("Developer Settings") {
|
|
@Previewable @State var enabled = true
|
|
@Previewable @State var keys = PreviewRegistrationKeys()
|
|
@Previewable @State var cache = DebugSymbolCache(
|
|
root: URL.temporaryDirectory.appending(path: UUID().uuidString),
|
|
helperURL: URL.temporaryDirectory.appending(path: "preview-symbol-helper")
|
|
)
|
|
DeveloperSettingsView(isEnabled: $enabled, keys: keys, cache: cache)
|
|
}
|
|
#endif
|