Start here
Getting Started
Install NovaNetworkClient and decode your first typed response in a few focused steps.
Requirements
Swift6.2 or newer
PlatformsmacOS 13+, iOS 16+
Concurrencyasync/await
Install the package
Add the repository URL in Xcode’s Package Dependencies panel, then link NovaNetworkClient to your target.
dependencies: [
.package(
url: "https://github.com/maxches99/NovaNetwork.git",
from: "2.11.0"
)
]That configuration resolves no third-party dependencies. The optional @Endpoint macro is the one part of the package that needs swift-syntax, so it sits behind a SwiftPM trait you enable with traits: ["EndpointMacros"].
Make your first request
Import the package, describe the response, and let the generic return type drive decoding.
import Foundation
import NovaNetworkClient
struct Todo: Decodable, Sendable {
let id: Int
let title: String
let completed: Bool
}
let client = NetworkClient(transport: Transport())
let request = APIRequest(
method: .get,
url: URL(string: "https://jsonplaceholder.typicode.com/todos/1")!
)
let todo: Todo = try await client.load(
request: request,
authScope: "public"
)Keep errors visible
NetworkError separates HTTP, transport, decoding, and cancellation failures. Handle only cases that change feature behavior and let the rest flow to your normal error surface.