Open Sound Control (OSC) toolkit written in Swift for Apple platforms, Linux, and Android.
- OSC address pattern matching and dispatch
- Convenient OSC message value type masking, validation and strong-typing
- Modular: use the provided network I/O layer by default, or use your own
- Support for custom OSC types
- Supports Swift 6 strict concurrency
- Fully unit tested
- Full DocC documentation
All network I/O extension repositories depend on SwiftOSC Core. It provides value types, encoding/decoding logic and message dispatch abstractions.
| Repository | macOS | iOS | tvOS | visionOS | watchOS | Linux | Android | Windows |
|---|---|---|---|---|---|---|---|---|
| swift-osc-core | 🟢 | 🟢 | 🟢 | 🟢 | 🟢 | 🟢 | 🟢 | - |
A limited number of network I/O backends are available, with more added in future on a needs-be basis.
| Repository | I/O Backend | macOS | iOS | tvOS | watchOS | Linux | Android | Windows |
|---|---|---|---|---|---|---|---|---|
| swift-osc-io-cocoa | CocoaAsyncSocket | 🟢 | 🟢 | 🟢 | - | - | - | - |
| swift-osc-io-nio | SwiftNIO | 🟢 | 🟢 | 🟢 | 🟢 | 🟢 | 🟢 | - |
The library and its extensions are available as Swift Package Manager (SPM) packages.
To get started with all extensions:
-
Add the swift-osc umbrella repo as a dependency.
.package(url: "https://github.com/orchetect/swift-osc", from: "3.0.0")
-
Add SwiftOSC to your target.
.product(name: "SwiftOSC", package: "swift-osc")
-
Import SwiftOSC to use it. This will import the core module and default network I/O module.
import SwiftOSC -
See the getting started guide and the code examples for the default network I/O module to see the library in action.
To use a specific network I/O module, use the respective I/O repository as a dependency instead of the swift-osc umbrella repository.
Full online documentation is available for all of the extension repositories. Check the README in each repository for a link to its documentation.
For new users, see the getting started guide and the code examples for the default network I/O module to see the library in action.
Coded by a bunch of 🐹 hamsters in a trenchcoat that calls itself @orchetect.
Licensed under the MIT license. See LICENSE for details.
If you enjoy using SwiftOSC and want to contribute to open-source financially, GitHub sponsorship is much appreciated. Feedback and code contributions are also welcome.
Please do not email maintainers for technical support. Several options are available for issues and questions:
- Questions and feature ideas can be posted to Discussions.
- If an issue is a verifiable bug with reproducible steps it may be posted in Issues.
Contributions are welcome. Posting in Discussions first prior to new submitting PRs for features or modifications is encouraged.
In an effort to maintain a consistent level of code quality and safety, this repository was built by hand and is maintained without the use of AI code generation.
AI-assisted contributions are welcome, but must remain modest in scope, maintain the same degree of quality and care, and be thoroughly vetted before acceptance.
This repository was previously a mono-repo known as OSCKit. In April of 2026 it was renamed swift-osc and I/O modules were split off into their own extension repositories.
