Files
VirtualBuddy/VirtualCore/Source/Debugging/VirtualBuddyDebugging.swift
Guilherme Rambo aabca5342d Xcode app provisioning (#823)
* 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
2026-11-24 17:46:23 -03:00

24 lines
1.1 KiB
Swift

import Foundation
import MacDebugHost
public enum VirtualBuddyDebugging {
public static let host = DebugHostConfiguration(
applicationURL: Bundle.main.bundleURL,
helperURL: Bundle.main.bundleURL.appendingPathComponent("Contents/MacOS/vbdebug"),
runtimeDirectory: URL(fileURLWithPath: "/private/tmp/vbdebug-\(getuid())", isDirectory: true),
// Xcode schemes created by earlier versions refer to this directory. Do not move it.
linksDirectory: FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask)[0]
.appendingPathComponent("codes.rambo.VirtualBuddy/XcodeDebugging", isDirectory: true)
)
public static let bindings = KeychainDebugBindingStore(
service: (Bundle.main.bundleIdentifier ?? "codes.rambo.VirtualBuddy") + ".debug-bindings"
)
@MainActor public static let symbolCache = DebugSymbolCache(
root: FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask)[0]
.appendingPathComponent("codes.rambo.VirtualBuddy/DebugSymbols"),
helperURL: host.helperURL
)
}