Skip to main content
The Whop iOS SDK is distributed as separate packages for different features. Install only what you need.

WhopCheckout (In-App Purchases)

The WhopCheckout package handles subscriptions and payments in your app.

Step 1: Add Package Dependency

In Xcode, go to FileAdd Package Dependencies… Enter the package URL:
https://github.com/whopio/whopsdk-checkout-swift

Step 2: Select Version

Choose the latest version or specify a version range:
  • Up to Next Major: Recommended for production
  • Exact Version: For stability

Step 3: Import and Configure

import SwiftUI
import WhopCheckout

@main
struct YourApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
                .environment(Checkout.shared)
                .task {
                    try? await Checkout.shared.configure(
                        companyId: "biz_xxxxxxxxxxxxxx",
                        apiKey: "your_api_key_here",
                        plans: [
                            .init(whopId: "plan_xxxxx", appleId: "monthly_sub")
                        ]
                    )
                }
        }
    }
}

Build a Paywall

Continue with the full setup guide

WhopChat (Embedded Chat)

Use WhopChat to embed Whop chat channels in your app.

Step 1: Add Package Dependency

In Xcode, go to FileAdd Package Dependencies… Enter the package URL:
https://github.com/whopio/whopsdk-chat-swift

Step 2: Select Version

Choose the latest version or specify a version range.

Step 3: Import and Configure

import SwiftUI
import Whop

@main
struct YourApp: App {
    init() {
        Whop.configure(
            appID: "app_xxxxxxxxxxxxxx",
            tokenProvider: {
                try await fetchWhopToken()
            }
        )
    }

    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}

Embedded Chat

Continue with the chat integration guide

Requirements

  • iOS 17.0+
  • Xcode 16.0+
  • Swift 5.10+

Next steps