Skip to content

Installation

SwiftSonic is distributed as a Swift Package. It supports Swift Package Manager and Xcode’s built-in package integration.

Add SwiftSonic to the dependencies array of your Package.swift:

dependencies: [
.package(url: "https://github.com/MathieuDubart/SwiftSonic", from: "0.6.1")
]

Then add "SwiftSonic" to the dependencies of any target that should use it:

.target(
name: "MyApp",
dependencies: ["SwiftSonic"]
)
  1. In Xcode, choose File → Add Package Dependencies….
  2. Paste https://github.com/MathieuDubart/SwiftSonic into the search field.
  3. Pick the version rule (recommended: Up to next major from 0.6.1).
  4. Add the SwiftSonic library to your app target.

TODO: confirm minimum supported platform versions (iOS, macOS, tvOS, watchOS, visionOS, Linux) from Package.swift in the SwiftSonic repository.

TODO: confirm minimum supported Swift toolchain (5.9 / 5.10 / 6.0?) from Package.swift.

Once SwiftSonic resolves, import it from any Swift file:

import SwiftSonic

If the build succeeds, you’re ready to make a first request.