Kommunicate Developer Docs | AI Customer Support Integration Guides

Kommunicate Developer Docs | AI Customer Support Integration Guides

  • Book a Demo
  • Try For Free

›iOS

Web

  • Installation
  • CMS Installation
  • Authentication
  • Conversation
  • Conversation Assignment
  • Customization
  • Localization
  • Logout
  • Troubleshooting

Android

  • Installation
  • Authentication
  • Push Notification
  • Conversation
  • Customization
  • Localization
  • Logout
  • Migration
  • Troubleshooting

iOS

  • Installation
  • SwiftUI Setup (Optional)
  • Authentication
  • Push Notification
  • Conversation
  • Customization
  • Configuration
  • Localization
  • Logout
  • Troubleshooting

React Native

  • Installation
  • Expo Installation
  • Authentication
  • Push Notification
  • Conversation
  • Customization
  • Logout
  • Troubleshooting

Flutter Mobile

  • Installation
  • Authentication
  • Push Notification
  • Conversation
  • Customization
  • Localization
  • Troubleshooting

Flutter Web

  • Installation
  • Authentication
  • Conversation

Ionic/Cordova

  • Installation
  • Authentication
  • Push Notification
  • Conversation
  • Customization
  • Localization
  • Logout
  • Resolving Errors

Ionic/Capacitor

  • Installation
  • Authentication
  • Push notification
  • Customization

Rich Messages

  • How To Use
  • Types of Rich Messages

AI Agents

  • AI Agents Setup
  • Open AI, Anthropic and Gemini
  • Dialogflow Integration
  • Lex Integration
  • Kompose AI Agent Builder
  • IBM Watson Integration
  • Custom AI Agent Integration
  • Import Kompose AI Agent
  • AI Agent Samples

Integrations

  • Zapier
  • WhatsApp
  • WhatsApp 360Dialog
  • WhatsApp Twilio
  • WhatsApp Cloud API
  • Instagram Integration
  • Telegram Integration
  • Sunshine Integration
  • Freshdesk Integration
  • Pipedrive Integration
  • Agile Integration
  • Slack Integration
  • Google Analytics

Platform APIs

  • Authentication
  • Endpoints

Dashboard Features

  • Analytics
  • Conversations
  • Users
  • AI Agent Integration
  • Helpcenter
  • Campaign Messaging
  • Settings

Configuration

  • Single Sign On (SSO) Setup
  • Webhooks
  • Access Token URL
  • Email Fallback

SwiftUI Setup (Optional)

Creating an AppDelegate for Customization and Setup

To perform setup tasks such as initializing Kommunicate or handling its push notifications, you need to include an AppDelegate in your SwiftUI project.

If your project does not already include an AppDelegate, follow these steps to add and configure one.

Step 1: Create an AppDelegate.swift File

Create a new Swift file in your project and name it AppDelegate.swift.

Step 2: Add the Following Code

Paste the following implementation inside AppDelegate.swift:

import UIKit
import Kommunicate

class AppDelegate: NSObject, UIApplicationDelegate {
    func application(_ application: UIApplication,
                     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        // Initialize Kommunicate with your App ID
        Kommunicate.setup(applicationId: "YOUR_APP_ID") 
        return true
    }
}

Step 3: Register AppDelegate in Your SwiftUI App

In your main App struct (usually the entry point of the SwiftUI app), register the AppDelegate:

@main
struct YourApp: App {
    @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate

    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}

Step 4: Add Customization Code in AppDelegate

Add your customization logic inside the AppDelegate. Here's an example:

func application(_ application: UIApplication,
                 didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

    // Initialize Kommunicate with your App ID
    Kommunicate.setup(applicationId: "YOUR_APP_ID")

    // Customize UI settings
    Kommunicate.defaultConfiguration.hideBottomStartNewConversationButton = true

    return true
}

For more customization options, refer to the 📄 Kommunicate iOS Customization Guide.

Step 5: Setup Push Notifications (Optional)

To handle push notifications, your AppDelegate should conform to UNUserNotificationCenterDelegate and import the necessary framework:

import UserNotifications

class AppDelegate: NSObject, UIApplicationDelegate, UNUserNotificationCenterDelegate {
    // Implement required notification delegate methods here
}

Refer to the official Kommunicate documentation for push notification setup instructions: 📄 Kommunicate iOS Push Notification Guide

Tip: Using UIApplicationDelegateAdaptor allows you to maintain UIKit-style configuration and lifecycle management while still leveraging SwiftUI.

Using the Top View Controller Instead of self

When working with SwiftUI or other UIKit contexts where self (i.e., the current UIViewController) isn't directly available, you can use a utility function to retrieve the top-most view controller in your app. This is especially useful when you need to present a view controller or trigger UI-related actions.

Utility Extension

Add the following extension to retrieve the top view controller from the current window scene:

extension UIApplication {
    class func topViewController(base: UIViewController? = UIApplication.shared.connectedScenes
        .compactMap { $0 as? UIWindowScene }
        .flatMap { $0.windows }
        .first(where: { $0.isKeyWindow })?.rootViewController) -> UIViewController? {
        
        if let nav = base as? UINavigationController {
            return topViewController(base: nav.visibleViewController)
        } else if let tab = base as? UITabBarController, let selected = tab.selectedViewController {
            return topViewController(base: selected)
        } else if let presented = base?.presentedViewController {
            return topViewController(base: presented)
        }
        return base
    }
}

Example Usage

Here's how you can use this utility in a practical scenario—for instance, when integrating Kommunicate to present a conversation screen:

guard let topVC = UIApplication.topViewController() else { return }

Kommunicate.createAndShowConversation(from: topVC) { error in
    guard error == nil else {
        print("Conversation error: \(error.debugDescription)")
        return
    }
    // Success
}

Note: This approach ensures your app uses the correct top-most view controller when presenting new UI, avoiding issues with undefined or missing self in SwiftUI environments.

← InstallationAuthentication →
  • Creating an AppDelegate for Customization and Setup
    • Step 1: Create an AppDelegate.swift File
    • Step 2: Add the Following Code
    • Step 3: Register AppDelegate in Your SwiftUI App
    • Step 4: Add Customization Code in AppDelegate
    • Step 5: Setup Push Notifications (Optional)
  • Using the Top View Controller Instead of self
    • Utility Extension
    • Example Usage

Start Small. Prove Value. Scale Safely

You don't need to bet your entire support operation on AI.
Start with the conversations that are safe to automate using an AI agent.
Expand as confidence grows.

Get StartedSee a Live Demo
Kommunicate logo
*Subscribe to our newsletter
Product
No-Code AI Agent BuilderGenerative AI ChatbotVoice AIAI Email TicketingFAQ ChatbotLive Chat
OpenAI IntegrationGoogle Gemini IntegrationAnthropic IntegrationAI Agent Features
Industries
Healthcare AI AgentEcommerce AI AgentEducation AI AgentBanking AI Agent
Gaming AI AgentTravel AI AgentTelecom AI AgentInsurance AI Agent
Integrations
WhatsApp AI AgentZendesk AI AgentWordpress AI AgentAndroid Chatbot SDKiOS Chatbot SDK
Facebook Messenger AI AgentInstagram AI Agent
All Integrations
Resources
Chatbot TemplatesCase StudiesWhitepapersAI Customer Service Guide
Chatbot GuideVideosKnowledge HubComparisons
ROI CalculatorBlogsGlossary
Company
About UsPricingContact UsAffiliate ProgramPartner ProgramMediaHelp CenterTrust CenterAPI Status
Languages
ArabicSpanishFrenchGermanPortugueseItalianSwedishRussian
© Kommunicate 2026
T&CPrivacy PolicyCareerSLADPASitemap