ObjectBox Swift Generator
August 25, 2025 ยท View on GitHub
This is a fork of sourcery modified to be used as the ObjectBox Swift model file and code generator for the ObjectBox Swift SDK.
See the Getting Started page on how to use the ObjectBox Swift SDK.
Development
This is a Swift Package.
Recent changes are documented in the changelog.
SwiftLint is added using the SwiftLintPlugins repository.
Run its command plugin manually using Xcode (right-click the package, select "SwiftLintCommandPlugin") or run the command shown below.
(Note: due to a bug in Swift 6.1 can't use the build plugin.)
# Build
swift build
# Run swiftlint from the command line
swift package plugin --allow-writing-to-package-directory swiftlint
# Run unit tests
swift test
Additional generator tests exist in the Swift SDK repository (look for "CodeGenTests"). They use the release artifact discussed below.
Releasing
An application archive for use by the Swift SDK is produced using _build.command.