Docs
DashboardRelease Notes
  • What is DeepConverse?
  • Chatbots
    • Basics
      • Building chatbot intents
      • Intent action responses
      • Chatbot Persistence mode
      • Publishing changes
    • Advanced Functionality
      • Connection Override
      • User Identity Verification
      • Announcements
      • Channel Specific Functionality
        • Zendesk Sunshine Conversations
          • How to handle image and file uploads in Zendesk Sunshine Conversations?
        • Zendesk Chat (Classic)
          • How to handoff conversations to Zendesk Chat (Classic) ?
        • Calendly
    • Branding
    • Deploy
      • Chatbot Versioning
      • iOS SDK
        • iOS (Custom Webview)
      • Android SDK
      • Adding widget to your Zendesk Help Center
      • Adding widget to your website
      • Custom Initialization and Passing Metadata
      • Open chatbot via Javascript
      • Adding widget to your Shopify Store
        • Adding the widget to Shopify via the Theme editor embed block
    • Localization
    • Customizations
      • Adding a link to your Privacy Policy in Chatbot window
  • Voice Bot
    • Getting Started with Voice Bots
    • Voice Bot Architecture
    • Supported use cases for Voice Bot
    • Setup and Configuration
  • Ticket Automation
    • Setup Zendesk email and ticket automation
  • Guides
    • Building Guides
    • Guide Theme Customization
    • Embedding Guides on your website
    • Embedding Guides in Chatbots
    • How to copy Guides across sites
  • Conversational Flow Builder
    • What is the Conversation Flow Builder?
    • Assign Parameters in Conversations
      • Predefined Parameters
    • How to use Rules in Conversations
    • Conversation Blocks
      • Question
      • Salesforce Blocks
        • Agent Availability Block
        • Live Agent Handover
      • Guide Blocks
        • Guide Step (Guide Flow)
        • Solved Block
        • Unsolved Block
        • Guide (Chatbot)
      • HTTP Request
      • Client Events
      • Policy
      • Zendesk Sunshine Conversations Handoff (In Widget)
    • Data Tables
      • How to read or search data from Data Tables?
  • Analytics
    • Chatbot Analytics
    • Viewing Chat Conversations
    • Message Viewer
    • Integrating with Google Analytics
    • Export API
      • Conversations Endpoint
      • Messages Endpoint
  • Integrations
    • Supported Integrations
      • Zendesk
      • Zendesk Sunshine Conversations
      • Salesforce
      • Gorgias
  • Account
    • Adding Users
    • Permissions and Roles
    • Multiple Sites
  • Security
    • DeepConverse Public IPs
    • Subprocessors
    • Data Request Policy
    • Technical and Organizational Security Measures
    • Reporting Security Vulnerabilities
      • Log4Shell Vulnerability
    • Generative AI - Technical Security Measures
  • Support
    • Contacting Support
    • Service Levels and Response Times
    • Platform Stability
Powered by GitBook
On this page
  • Installation
  • Setup

Was this helpful?

  1. Chatbots
  2. Deploy

iOS SDK

DeepConverse provides an easy to use SDK for integrating the chatbot into your app. To setup the SDK follow the steps below.

Installation

You can include the SDK by using Cocoapods and adding this into your Podfile

pod 'DeepConverse', :git => 'https://github.com/converselabs/ios-sdk.git', :branch => 'release'

Setup

Here is a sample ViewController showing how you can include the SDK and load the bot on the click action of a button. You can also pass in metadata to the chatbot.

You will require DOMAIN and BOT_NAME which can be found from the dashboard.

import UIKit

import DeepConverse

class ViewController: UIViewController {

    private var sdk : DeepConverseSDK? = nil  

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
        var metadata = [String:String]()
        metadata["draft"] = "true"

        let session = DeepConverseSDKSession.init(
            subDomain: <DOMAIN>,
            botName: <BOT_NAME>,
            metadata: metadata,
            webViewTimeout: 60.0
        )

        sdk = DeepConverseSDK(delegate: self, session: session)
    }

    

    @IBAction func Click(_ sender: Any) {
        sdk?.openBot(viewController: self)
    }
}

extension ViewController: DeepConverseDelegate {

    func didWebViewFail(withError: DeepConverseWebHostError) {
        print("Did fail with error")
    }

    func didReceiveEvent(event: [String : Any]) {

    }

    func didCloseBot() {
        print("Did Close")
    }

    func didOpenBot() {
        print("Did Open")
    }
}
PreviousChatbot VersioningNextiOS (Custom Webview)

Last updated 1 year ago

Was this helpful?