الانتقال إلى المحتوى الرئيسي

Swift SDK — zeq

Swift 5.9+ client. async/await throughout, Codable for JSON, no third-party dependencies. Targets iOS 16+, macOS 13+, visionOS 1+. Same wire format as every other SDK.

Install

// Package.swift
.package(url: "https://github.com/hulyasmath/zeq-swift", from: "1.287.5"),

Or in Xcode: File → Add Packages… and paste the URL.

First call — public, no key

import Zeq

let p = try await Zeq.pulse()
print("Zeqond \(p.zeqond) · phase \(p.phase) · R(t) \(p.rT)")

Authed call — zeq.compute()

let zeq = ZeqClient(apiKey: ProcessInfo.processInfo.environment["ZEQ_KEY"]!)

let r = try await zeq.compute(.init(
operators: ["KO42", "QM5", "GR40"],
domain: "cross",
inputs: ["t": 0]
))

print("\(r.value) \(r.unit) ± \(r.uncertainty)")
print("zeqProof: \(r.zeqProof)")
print("compliance: \(r.compliance.standardsAligned)")

r.compliance is the ZeqCompliance v1 envelope.

Why Swift here

  • iOS apps. Drop into a SwiftUI view; observe the entangled state in real time on a phone.
  • Medical devices on iPad. HIPAA-aligned envelopes paired with on-device biometric attestation; the Embedded C observer agent sits next to the Swift app on a paired peripheral.
  • visionOS spatial workspaces. Compose physics simulations live in 3D with Zeq.compute(...) driving the timeline.

Compose with

Source