Skip to content

Repository files navigation

TalkTroves Chat Widget

The TalkTroves Chat Widget enables businesses to integrate live customer support into websites, mobile applications, and desktop applications with minimal setup.

It provides real-time messaging, AI-powered assistance, conversation history, and team collaboration while offering a fully customizable chat experience that matches your brand.


Features

  • Live Chat
  • AI-powered Customer Support
  • Multi-Agent Support
  • Conversation History
  • Team Collaboration
  • Real-time Messaging
  • Typing Indicators
  • Read Receipts
  • Offline Messaging
  • File Sharing
  • Visitor Tracking
  • Business Hours
  • Multi-language Support
  • Custom Branding
  • Analytics Dashboard
  • Mobile & Desktop Support
  • Secure Communication

Getting Started

Create a TalkTroves Account

  1. Visit https://app.talktroves.com
  2. Click Sign Up
  3. Register using your business email address.
  4. Verify your email.
  5. Log in to your account.

Create a Workspace

After logging in:

  1. Create a new Workspace.
  2. Enter your business information.
  3. Invite team members (optional).

A workspace can contain multiple projects.


Create a Project

Inside your workspace:

  1. Click Create Project.
  2. Enter a project name.
  3. Select the integration type.
  4. Save the project.

Each project has its own configuration and Widget Key.


Getting Your Widget Key

Every TalkTroves project is assigned a unique Widget Key.

To obtain your Widget Key:

  1. Log in to https://app.talktroves.com
  2. Open your Workspace.
  3. Select the desired Project.
  4. Navigate to Widget Settings or Integration Settings.
  5. Copy the generated Widget Key.

Example:

YOUR_WIDGET_KEY

This key uniquely identifies your TalkTroves project and is required when initializing the widget.


User Identification

For the best experience, provide a stable unique identifier for every authenticated user.

Recommended identifiers include:

  • Customer ID
  • Database ID
  • UUID
  • Firebase UID
  • Authentication Provider ID

Using the same identifier across sessions allows TalkTroves to:

  • Restore previous conversations
  • Maintain conversation history
  • Identify returning users
  • Route conversations correctly

Optional User Information

Providing additional user information helps support agents deliver better customer service.

Supported information may include:

  • Name
  • Email Address
  • Phone Number
  • Company
  • Profile Image
  • Custom Metadata

Widget Customization

The TalkTroves Widget is fully customizable to match your brand.

Common customization options include:

  • Primary Color
  • Accent Color
  • Company Logo
  • Chat Launcher Icon
  • Welcome Message
  • Widget Position
  • Theme (Light / Dark)
  • Language
  • Business Hours
  • Launcher Visibility

Most appearance settings can be managed directly from the TalkTroves Dashboard.


Conversation Management

TalkTroves automatically manages:

  • Conversation History
  • Active Sessions
  • Agent Assignment
  • Unread Messages
  • Offline Messages
  • Visitor Tracking
  • Message Delivery Status
  • Read Receipts

Dashboard Features

The TalkTroves Dashboard allows administrators to:

  • Manage Conversations
  • Manage Agents
  • Configure AI Assistants
  • Customize the Chat Widget
  • View Analytics
  • Create Teams
  • Configure Business Hours
  • Manage Projects
  • Configure Automation Rules

Dashboard:

https://app.talktroves.com


Security

Every project is isolated using its own Widget Key.

For security:

  • Keep your Widget Key secure.
  • Use production keys only in production environments.
  • Avoid exposing sensitive credentials publicly.
  • Rotate your keys if compromise is suspected.

Best Practices

  • Use a stable user identifier.
  • Provide user information whenever available.
  • Configure branding before deployment.
  • Test integrations in a staging environment.
  • Keep your SDK or integration updated to the latest version.

Frequently Asked Questions

Can I use the widget on multiple platforms?

Yes. TalkTroves provides integrations for multiple platforms and technologies. Each project uses the same Widget Key regardless of the client platform.


Can I customize the widget?

Yes. The widget supports branding, colors, launcher customization, themes, welcome messages, positioning, and more.


Will conversations persist?

Yes. Conversations are automatically restored when the same user identifier is provided.


Can multiple agents handle conversations?

Yes. Multiple support agents can collaborate within the same workspace.


Support

Website

https://talktroves.com

Dashboard

https://app.talktroves.com

Documentation

https://talktroves.com

Support Email

support@talktroves.com


Package Installation

Requirements

  • iOS 16+
  • Xcode 15+
  • Swift 5.9+

Install

Xcode (recommended)

  1. Open your app project in Xcode.
  2. File → Add Package Dependencies…
  3. Paste the package URL:
https://github.com/Numanshakir/Talktroves_ChatSDK_iOS.git
  1. Set dependency rule to Up to Next Major Version from 2.0.1.
  2. Add the Talktroves_ChatSDK product to your app target.

Swift Package Manager (Package.swift)

dependencies: [
    .package(
        url: "https://github.com/Numanshakir/Talktroves_ChatSDK_iOS.git",
        from: "2.0.1"
    ),
]

Then add the product to your target:

.target(
    name: "YourApp",
    dependencies: [
        .product(name: "Talktroves_ChatSDK", package: "Talktroves_ChatSDK_iOS"),
    ]
)

Local development (optional)

While working on the package itself:

.package(path: "../Talktroves_ChatSDK_iOS")

Usage

import Talktroves_ChatSDK

Talktroves_ChatSDKView(
    config: Talktroves_ChatSDKConfig(
        visitorConfig: VisitorConfig(
            baseUrl: "https://app.talktroves.com",
            tenantId: "YOUR_TENANT_ID",
            url: "https://your-app.example",
            title: "Support",
            tz: 5,
            navigatorLanguage: "en-US",
            isMobile: true,
            domain: "your-app.example",
            enableSocket: true,
            pollingInterval: 3
        ),
        userData: SupportUserData(
            name: "Imran",
            email: "imran@example.com"
        ),
        botName: "TalkTroves Bot",
        headerTitle: "support",
        subHeaderTitle: "live support",
        subHeaderSubtitle: "Ask us anything"
    ),
    onSessionReady: { tenantId, sessionId in
        print("Session \(sessionId) for \(tenantId)")
    },
    onExitPressed: { /* dismiss */ },
    onAttachmentPressed: {
        // Return AttachmentFile from PhotosUI / document picker
        return nil
    }
)
.frame(maxWidth: 380, maxHeight: 600)

Architecture

Sources/Talktroves_ChatSDK/
├── Core/           # VisitorConfig, API paths, errors, logger
├── Domain/         # Entities + VisitorRepository contract
├── Data/           # URLSession + Socket.IO datasources, DTOs, repository
├── Models/         # ChatMessage, AttachmentFile, SupportUserData
├── Services/       # VisitorChatService, polling, events
└── UI/             # SwiftUI Talktroves_ChatSDKView + ViewModel

Visitor SDK flow

  1. POST /chatscript/visitor/sessionsessionId
  2. Poll GET /chatscript/visitor/polling every 3s (always on)
  3. Optional Socket.IO (message_to_client, typing, …)
  4. Send via POST /chatscript/visitor/activity

sessionId is also used as visitorId, Socket connectionId, and poll sid.

Example app

Open Example/Talktroves_ChatSDKExample.xcodeproj in Xcode, select a simulator, and run.

open Example/Talktroves_ChatSDKExample.xcodeproj

Build the package

xcodebuild -scheme Talktroves_ChatSDK \
  -destination 'generic/platform=iOS Simulator' \
  build

Versioning & releases

This package is distributed via Git tags (Swift Package Manager).

Version Tag Notes
2.0.1 2.0.1 Published under Talktroves_ChatSDK_iOS repo
2.0.0 2.0.0 Renamed package/product to Talktroves_ChatSDK
1.0.0 1.0.0 Initial public release (SupportChat)

To publish a new version:

  1. Merge changes to master
  2. Tag the release:
git tag -a 2.0.1 -m "Release 2.0.1"
git push origin 2.0.1
  1. (Optional) Create a GitHub Release from that tag
  2. Consumers resolve updates with from: "2.0.1" (or their chosen version rule)

Ensure the GitHub repository is public so others can add the package URL in Xcode.

License

MIT — see LICENSE.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages