Skip to content

iOS setup

Use the OneSDK Swift package source and version supplied for your workspace. Add it through Xcode’s package dependency settings and link the OneSDK product to the app target. For local development in the One repository, the source is packages/sdk-ios.

A standalone copied package has been compiled from an external consumer project. For local acceptance, use Xcode’s Add Local package option with the supplied OneSDK package directory and link its OneSDK product. A public remote source and accepted release version still need to be supplied before registry-independent release installation is available. Do not substitute an unverified repository URL or assume a development checkout is a published release.

Get the selected Test app’s public key from Configure → Developer Access. Inject it through your app’s existing configuration. Never include a server secret key.

import SwiftUI
import OneSDK
@main
struct ExampleApp: App {
@StateObject private var one = OneSDK(
config: OneSDKConfig(apiKey: "YOUR_TEST_PUBLIC_KEY")
)
var body: some Scene {
WindowGroup {
ContentView()
.environmentObject(one)
}
}
}

The SDK starts automatically by default. Its API origin is built into the SDK. Share this instance rather than creating another in each screen.

Launch the app, then inspect the customer in One Admin’s Test environment. Add one feature at a time and verify its full app flow. For purchases, use Paid access and Purchases and paywalls.

Keychain identity is isolated by app bundle identifier and One environment. Only use an explicit storage namespace when your integration needs a stable override, and never share one across different One apps.

Use the SDK’s cached entitlement reads and refresh behavior. Normal reads have a 60-second freshness window and shared in-flight requests. Force refresh only for an intentional purchase, restore, identity change, or repair workflow.

Do not add connectivity probes, per-screen refresh timers, a second event queue, or an app-owned retry loop. The SDK owns request concurrency, backoff, batched events, and cumulative usage uploads.

For customer feedback, read Surveys. To offer Apple’s native flow for eligible purchases, read iOS refund requests.

Next: Contact Support, Usage and diagnostics, or the release checklist.