IOS SDK
Receive decision requests in your IOS app
Installation
dependencies: [
.package(url: "https://github.com/noxy-network/ios-sdk.git", from: "2.1.0"),
],
targets: [
.target(name: "YourApp", dependencies: ["NoxySDK"]),
]
Quick Start
import NoxySDK
// Email identity (also: .phone, .userId, or .eoa / .scw for wallet)
let identity = NoxyIdentity.email(email: "you@example.com")
let client = createNoxyClient(
identity: identity,
network: NoxyNetworkOptions(
appId: "your-app-id",
relayUrl: "https://relay.noxy.network",
appSigningSecret: "your-app-signing-secret",
)
)
// 3. Initialize (loads or registers device, connects to relay)
try await client.initialize()
// 4. Subscribe to decision requests from the relay
try await client.on { messageId, decision in
print("messageId:", messageId as Any, "decision:", decision)
// Show UI, use UNMutableNotificationContent
// e.g. decision_id, title, body — use sendDecisionOutcome when the user approves/rejects
}
// 5. after user taps Approve/Reject in your UI:
try await client.sendDecisionOutcome(decisionId: "...", outcome: .approve)
// 6. Disconnect when done
await client.close()