Using Sublimation as a Lifecycle Service for applications such as Hummingbird.
Apple Platforms
- Xcode 16.0 or later
- Swift 6.0 or later
- iOS 17 / watchOS 10.0 / tvOS 17 / macOS 14 or later deployment targets
Linux
- Ubuntu 20.04 or later
- Swift 6.0 or later
To integrate SublimationService into your app using SPM, specify it in your Package.swift file:
let package = Package(
...
dependencies: [
.package(url: "https://github.com/brightdigit/SublimationService.git", from: "1.0.0")
],
targets: [
.target(
name: "YourServerApp",
dependencies: [
.product(name: "SublimationService", package: "SublimationService"), ...
]),
...
]
)
For instance if you are using this with Hummingbird and using Bonjour, you can just add it as a service:
let sublimation = Sublimation(
bindingConfiguration: .init(
hosts: hosts,
configuration: configuration.hosting
)
)
var app = Application(
router: router,
server: .http1WebSocketUpgrade(webSocketRouter: wsRouter),
configuration: .init(address: .init(setup: configuration.hosting))
)
app.addServices(sublimation)
To learn more, check out the full documentation.
This code is distributed under the MIT license. See the LICENSE file for more info.