Skip to content

Repository files navigation

PKSNetwork

HTTP client foundation for Poikus iOS SDKs: pluggable transport, app-identity auth strategies (with an App Attest seam), pull-based access-token injection, RFC 7807 problem+json error mapping, and a bounded retry policy.

Requirements

  • iOS 16+ / macOS 13+
  • Swift 6
  • Depends on PKSCore

Installation

.package(url: "https://github.com/POIKUS-LLC/PKSNetwork.git", .upToNextMinor(from: "0.1.0"))

Local development

Inside the poikussource monorepo, Package.swift resolves PKSCore from GitHub by default (pinned to a released version), so a fresh checkout is always prod-ready with no extra setup. To build against the sibling pkscore folder on disk instead — e.g. while developing both packages together — export:

export PKS_LOCAL_PACKAGES=1

before running swift build, swift test, or xcodebuild. This only applies inside the monorepo, where the sibling package folders actually exist.

API

import PKSNetwork

let strategy = WebKeyStrategy(keyID: "key_id", secret: "raw_secret", origin: "https://example.com")
let client = HTTPClient(
    baseURL: URL(string: "https://api.example.com")!,
    transport: URLSessionTransport(),
    identityStrategy: strategy,
    tokenProvider: nil
)

let endpoint = Endpoint<MyResponse>(method: .get, path: "/v1/ping", authorization: .none)
let response = try await client.send(endpoint)

License

Apache-2.0

About

HTTP client foundation for Poikus iOS SDKs: pluggable transport, app-identity auth strategies, pull-based access-token injection, RFC 7807 error mapping, and bounded retry policy.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages