Swiftpack.co - Kyome22/XCHook as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Kyome22.
Kyome22/XCHook 0.0.8
Hooking the events (building and testing) of Xcode.app.
⭐️ 0
🕓 2 weeks ago
macOS
.package(url: "https://github.com/Kyome22/XCHook.git", from: "0.0.8")

XCHook

Hooking the events (building and testing) of Xcode.app.

Usage

Install XCHook to your project via Swift Package Manager

Add Swift Package: https://github.com/Kyome22/XCHook.git

Install scripts of XCHook to Xcode.app

import XCHook

if let xchook = XCHook() {
    xchook.install()
} else {
    print("Failed to initialize XCHook; Xcode.plist does not found.")
}

Receive XCHookEvent

import Combine
import XCHook

var cancellables = Set<AnyCancellable>()

XCHookReceiver.shared.xchookPublisher
    .sink { event in
        Swift.print("Project: \(event.project)")
        Swift.print("Status: \(event.status.rawValue)")
    }
    .store(in: &cancellables)

Uninstall scripts of XCHook from Xcode.app

import XCHook

if let xchook = XCHook() {
    xchook.uninstall()
} else {
    print("Failed to initialize XCHook; Xcode.plist does not found.")
}

GitHub

link
Stars: 0
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics