iOS SDK
UIKit integration
ReceptionKit presents the same SDK sheet in UIKit and SwiftUI apps. Add the package to your app target, then configure at launch and open chat from your existing interface.
1. Configure at launch
Configure in your existing app delegate and keep its other startup work. Replace app_YOUR_APP_ID with your App ID from the dashboard.
import ReceptionKit
import UIKit
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions options: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
Reception.configure(appId: "app_YOUR_APP_ID")
Reception.shared.appearance.showsCloseButton = true
return true
}Keep SDK calls on the main actor. In an existing delegate, preserve the method’s current return value.
2. Open chat from your button
@objc private func openSupport() {
Reception.shared.openChat()
}The call presents the chat over the current screen. Users dismiss it with a swipe or the optional close button.
3. Observe unread messages (optional)
Add this small re-arming helper to your app:
import Observation
import ReceptionKit
@MainActor
func observeUnreadCount(_ handler: @escaping @MainActor @Sendable (Int) -> Void) {
withObservationTracking {
handler(Reception.shared.unreadCount)
} onChange: {
Task { @MainActor in
observeUnreadCount(handler)
}
}
}Start it once from your view controller and update your existing badge:
observeUnreadCount { [weak self] count in
self?.supportButton.setTitle(count > 0 ? "Support (\(count))" : "Support", for: .normal)
}For a host-owned sheet or navigation destination, present ReceptionChatView() yourself and own its dismissal. Do not also call openChat() for that action.