Skip to main content
The iOS WhopChat SDK is coming soon. This documentation is a preview.
Embedded chat allows you to integrate Whop’s real-time messaging directly into your native iOS app.

Quick Start

Add the chat view to your SwiftUI views:
import SwiftUI
import WhopChat

struct ChatView: View {
    let channelID: String

    var body: some View {
        WhopChatView(channelID: channelID)
    }
}
Present the chat:
struct ContentView: View {
    @State private var showChat = false

    var body: some View {
        NavigationStack {
            Button("Open Chat") {
                showChat = true
            }
            .sheet(isPresented: $showChat) {
                ChatView(channelID: "feed_xxxxxxxxxxxxxx")
            }
        }
    }
}

Chat Style

Choose between Discord-style or iMessage-style chat:
WhopChatView(
    channelID: "feed_xxxxxxxxxxxxxx",
    style: .discord
)
WhopChatView(
    channelID: "feed_xxxxxxxxxxxxxx",
    style: .imessage
)
Defaults to .discord if not specified.

Push Notifications

Push notifications work automatically with zero code required.

Setup

Upload your APNs certificate to the Whop Dashboard (one-time setup). That’s it! The SDK automatically handles:
  • Requesting notification permission on first launch
  • Intercepting and registering the device token with Whop
  • Receiving push notifications for new messages
  • Opening the correct chat when tapped
The SDK uses method swizzling to automatically capture the device token from Apple, so no AppDelegate code is needed.