Skip to content

Commit 30b5e4b

Browse files
committed
Updates
1 parent 330a733 commit 30b5e4b

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

Core/Sources/RuntimeViewerCommunication/Connections/RuntimeXPCConnection.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ final class RuntimeXPCServerConnection: RuntimeXPCConnection {
161161
let response = try await serviceConnection.sendMessage(request: FetchEndpointRequest(identifier: identifier.rawValue))
162162
let connection = try XPCConnection(type: .remoteServiceFromEndpoint(response.endpoint))
163163
connection.activate()
164+
try await serviceConnection.sendMessage(request: RegisterEndpointRequest(identifier: identifier.rawValue, endpoint: listener.endpoint))
164165
try await connection.sendMessage(name: CommandIdentifiers.serverLaunched, request: listener.endpoint)
165166
self.connection = connection
166167
Self.logger.info("Ping client successfully")

RuntimeViewerPackages/Package.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ let package = Package(
126126
url: "https://github.com/MxIris-macOS-Library-Forks/SwiftyXPC",
127127
branch: "main"
128128
),
129+
.package(
130+
url: "https://github.com/Mx-Iris/RunningApplicationKit",
131+
branch: "main"
132+
),
129133
.package(path: "../Core"),
130134
],
131135
targets: [
@@ -163,7 +167,8 @@ let package = Package(
163167
.product(name: "IDEIcons", package: "ide-icons"),
164168
.product(name: "FilterUI", package: "filter-ui", condition: .when(platforms: appkitPlatforms)),
165169
.product(name: "Rearrange", package: "Rearrange", condition: .when(platforms: appkitPlatforms)),
166-
.product(name: "MachInjectorUI", package: "MachInjector", condition: .when(platforms: appkitPlatforms)),
170+
// .product(name: "MachInjectorUI", package: "MachInjector", condition: .when(platforms: appkitPlatforms)),
171+
.product(name: "RunningApplicationKit", package: "RunningApplicationKit", condition: .when(platforms: appkitPlatforms)),
167172
]
168173
),
169174
.target(

RuntimeViewerPackages/Sources/RuntimeViewerUI/RuntimeViewerUI.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
#if canImport(AppKit) && !targetEnvironment(macCatalyst)
99
@_exported import OpenUXKit
1010
@_exported import FilterUI
11-
@_exported import MachInjectorUI
11+
//@_exported import MachInjectorUI
12+
@_exported import RunningApplicationKit
1213
@_exported import Rearrange
1314
//@_exported import UXKit
1415
//@_exported import STTextView

RuntimeViewerUsingAppKit/RuntimeViewerUsingAppKit/Attach Process/AttachToProcessViewController.swift

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,11 @@ class AttachToProcessViewController: AppKitViewController<AttachToProcessViewMod
8383
}
8484

8585
extension AttachToProcessViewController: RunningApplicationPickerViewController.Delegate {
86-
func runningApplicationPickerViewController(_ viewController: MachInjectorUI.RunningApplicationPickerViewController, shouldSelectApplication application: NSRunningApplication) -> Bool {
87-
true
88-
}
89-
90-
func runningApplicationPickerViewController(_ viewController: MachInjectorUI.RunningApplicationPickerViewController, didSelectApplication application: NSRunningApplication) {}
91-
92-
func runningApplicationPickerViewController(_ viewController: MachInjectorUI.RunningApplicationPickerViewController, didConfirmApplication application: NSRunningApplication) {
86+
func runningApplicationPickerViewController(_ viewController: RunningApplicationPickerViewController, didConfirmApplication application: NSRunningApplication) {
9387
attachRelay.accept(application)
9488
}
9589

96-
func runningApplicationPickerViewControllerWasCancel(_ viewController: MachInjectorUI.RunningApplicationPickerViewController) {
90+
func runningApplicationPickerViewControllerWasCancel(_ viewController: RunningApplicationPickerViewController) {
9791
cancelRelay.accept(())
9892
}
9993
}

0 commit comments

Comments
 (0)