main | develop |
---|---|
A Swift library for Snowflake ID.
Snowflake
, main library that containsSnowflake
. (without importing Foundation)SnowflakeFoundationCompat
, library that contains makeSnowflake
interoperate better with Foundation.JSONDecoder
,JSONEncoder
extensions for easily using on JSON parse.
swift-snowflake aims to support all of the platforms where Swift 5.3 or later is supported.
To use this package in a SwiftPM project, you need to set it up as a package dependency:
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "MyPackage",
dependencies: [
.package(
url: "https://github.com/shizukusoft/swift-snowflake.git",
.upToNextMajor(from: "1.0.0") // or `.upToNextMinor
)
],
targets: [
.target(
name: "MyTarget",
dependencies: [
.product(name: "Snowflake", package: "swift-snowflake")
]
)
]
)