Relk · iOS + SwiftUI
Your first conversation.
Add a native support chat to your SwiftUI app, then send a message and reply from the dashboard.
01. Add the Swift package
You need iOS 17 or later and Swift 6. In Xcode, choose File → Add Package Dependencies and enter:
https://github.com/olegklimakov/relk-swiftSelect a current 0.4.x release and add the RelkKit product to your app target. The package has no third-party dependencies. You can inspect its releases and source.
02. Get your public app key
In the dashboard, create an app with its name and exact Bundle ID. Open General → SDK → Copy app key. The key starts with rk_pub_ and is intended to be included in your app. Keep administrative credentials and APNs keys out of client code.
03. Open the chat
This complete minimal app configures Relk at launch and presents the conversation from a button. In an existing app, add the configuration and modifier to your existing root; do not add a second @main entry.
import SwiftUI
import RelkKit
@main
@MainActor
struct QuickStartApp: App {
@State private var isChatPresented = false
init() {
Relk.configure(appKey: "rk_pub_YOUR_APP_KEY", notificationPrompt: .never)
}
var body: some Scene {
WindowGroup {
Button("Contact support") {
isChatPresented = true
}
.relkChat(isPresented: $isChatPresented, screen: "Home")
}
}
}
Replace rk_pub_YOUR_APP_KEY with your public app key. The screen value is context you choose to send, not an automatic recording of the screen.
This example uses notificationPrompt: .never to keep the first-message setup independent of push notifications. It does not configure reply notifications.
04. Prove the round trip
- Run the app and open Contact support.
- Send a recognisable test message.
- Find it in the dashboard Inbox and reply.
- Return to the open conversation and check that your reply appears.
If the message does not arrive, check the app key and network connection. A successful build alone does not prove message delivery.
Next: replies where you work
Connect a Telegram group to receive messages and reply in topics. Telegram is optional; you can use the dashboard Inbox on its own.
For push notifications, add the Push Notifications capability, configure your APNs credentials in the dashboard, and wire the app and notification delegates. Follow the SDK integration guide before switching to the automatic notification prompt.
Relk sends the message and selected screenshots with device and app context. Include this in your app’s privacy disclosures. Only put information you intend to share in screen names or custom metadata.
Checked against RelkKit 0.4.x · 17 November 2026