Install Talkieback in an iOS app with Swift
The TalkiebackKit package draws the button natively, with SwiftUI or UIKit, and opens the Talkieback panel. Allow ten minutes.
You need your app ID (pk_live_…). You will find it on the “Installation” page of your app, in Talkieback.
Step 1: Add the package
In Xcode: File, Add Package Dependencies, then paste this address and add
TalkiebackKitto your target.Swift Package Manager https://github.com/talkieback/TalkiebackKit
Step 2: Start Talkieback at launch
MyApp.swift import SwiftUI import TalkiebackKit @main struct MyApp: App { init() { Talkieback.start(appKey: "pk_live_…") } var body: some Scene { WindowGroup { ContentView() } } }
With UIKit, call
Talkieback.start(appKey:)inapplication(_:didFinishLaunchingWithOptions:). To say which screen the user is on:Swift Talkieback.setPlace("Album", params: ["side": "axis"])
Step 3: Allow the microphone
The system asks the user the first time they press the talk button. Add this line:
Info.plist <key>NSMicrophoneUsageDescription</key> <string>To leave a voice message for the team.</string>
Step 4: Notifications Optional
Add your APNs key to your app settings in Talkieback. The package registers the device on its own, and tapping a notification opens the right thread.
Step 5: Check
Run the app in development. The list of checks shows in the console and on the “Installation” page in Talkieback. Then send some test feedback.
Swift #if DEBUG Talkieback.check() #endif
Going further
Recognize your signed-in users
Once the user is signed in:
Talkieback.identify(id: user.id, email: user.email, hash: hashFromServer)
The hash is computed on your server, with the app secret: HMAC-SHA256(secret, id). Your users then find their feedback on all their devices. Pro and Business plans. The computation for Node, Python, PHP and Supabase.
Stuck on a step? Write to us.