Framework guide

Tierux iOS SDK

Swift SDK for iOS — StoreKit 2 verification, remote paywall config, and entitlement management. Source served via API for audit; integrate locally with SPM.

1

Download the SDK source

The Tierux iOS SDK source is served via API — no API key needed. Download and audit the full Swift source before integration.

# Download the Swift SDK source
curl -o tierux-ios-sdk.zip https://tierux.com/api/v1/sdk/download?platform=ios
unzip tierux-ios-sdk.zip -d Tierux

You can also browse the source in your browser before downloading.

2

Add via Swift Package Manager

Add the local package to your project's Package.swift or via Xcode (File → Add Package Dependencies → Add Local).

// Package.swift
dependencies: [
  .package(path: "Tierux")
],
targets: [
  .target(
    name: "YourApp",
    dependencies: [.product(name: "Tierux", package: "Tierux")]
  )
]
3

Initialize the SDK

Initialize Tierux once at app launch with your project's public app ID from create_project or the Tierux dashboard. No API key is needed on the client.

// App.swift or AppDelegate
import Tierux

@main
struct MyApp: App {
  init() {
    Tierux.shared.configure(appId: "app_xxx")
  }
  // ...
}
4

Show a paywall

Call showPaywall(from:paywallId:onResult:) with a presenting view controller. The SDK handles StoreKit 2 purchase flow and server-side verification, then returns one PaywallResult.

// In a UIViewController
Tierux.shared.showPaywall(from: self, paywallId: "pro") { result in
  switch result {
  case let .purchased(_, _, active, _, _):
    if active { unlockProFeatures() }
  case .cancelled:
    break
  case let .error(error):
    showError(error)
  case .winbackAccepted:
    unlockProFeatures()
  }
}

The paywall fetches its config from Tierux's servers at runtime — change packages, copy, and layout without an app release or App Store review.

5

Check entitlement state

For production feature gating, call the REST API from your backend — not the client. The SDK caches last-verified state for optimistic client-side checks.

// Client-side cache check
let isPro = try await Tierux.shared.isEntitled(
  userId: firebaseUid,
  entitlementId: "pro"
)
Related guides

Purchase verification

How Tierux verifies StoreKit 2 JWS server-side and returns normalized entitlement state.

Docs: StoreKit verification

Deep dive on Apple StoreKit 2 JWS verification, certificate chains, and notification handling.

Quickstart docs

Full integration path — from project creation to verified purchase in minutes.

Ship iOS subscriptions with StoreKit 2

Free tier — unlimited apps, 1 paywall. No credit card, no revenue share.

Start free