• Release Notes
  • User
  • Admin
  • Developers
  • Integrations

›iOS

General

  • Overview
  • LiveView / CoBrowsing / Session Recordings

JS API

  • Overview
  • CoBrowsing
  • LiveView / Session Recordings
  • WebChat
  • Web Calling
  • Video Conference
  • Logging
  • User
  • Team
  • API
  • Supported Browsers
  • Supported Technologies

Android

  • Overview
  • Installation
  • Usage
  • Reference
  • Licenses

iOS

  • Overview
  • Installation
  • Usage
  • Reference
  • Licenses

React Native

  • Overview
  • Installation
  • Usage
  • Reference

Cordova/Capacitor

  • Overview
  • Installation
  • Usage

Xamarin

  • Overview
  • Installation
  • Usage
  • Reference

Flutter

  • Overview
  • Installation
  • Usage
  • Reference

API Reference

SetupConfiguration

Swift
Objective-C
/**
Initializes the Chatvisor SDK Configuration.
*/

init(tenantId: String, token: String)
- (nonnull instancetype)initWithTenantId:(NSString * _Nonnull)tenantId token:(NSString * _Nonnull)token;

Additional configuration options

Swift
Objective-C
/**
Set server URL to which SDK connects to
*/

func setServerUrl(_ serverUrl: String)
- (void)setServerUrl:(NSString * _Nonnull)serverUrl;
Swift
Objective-C
/**
Set CDN URL to which SDK connects to
*/

func setCdnUrl(_ cdnUrl: String)
- (void)setCdnUrl:(NSString * _Nonnull)cdnUrl;

Chatvisor

Swift
Objective-C
/**
Initializes the Chatvisor SDK.

- Parameter config SetupConfiguration instance
*/

static func setup(with config: SetupConfiguration)
+ (void)setupWith:(SetupConfiguration * _Nonnull)config;

Chatvisor.coBrowsing

Start session

Swift
Objective-C
/**
Starts a new session

*/

func start()
- (void)start;
Swift
Objective-C
/**
Starts a new session

- Parameter result success: shareId: String or failure: Error
*/

func start(_ result: @escaping (LiveView.ChatvisorResult) -> Void)
- (void)start:(void (^ _Nonnull)(ChatvisorResult * _Nonnull))result;

Stop session

Swift
Objective-C
/**
Disconnects the current cobrowsing-session
*/

func stop() -> Void
- (void)stop;

Retrieve connection state

Swift
Objective-C
/**
Returns the current connection state
*/

func connectionState() -> LiveView.ChatvisorConnectionState
- (ChatvisorConnectionState)connectionState;

Monitor connection state

Swift
Objective-C
/**
Registers callback for connection state changes

- Parameter callback: Called when a session connection state changes
*/

func onConnectionStateChange(callback: LiveView.ConnectionStateResult?)
- (void)onConnectionStateChangeWithCallback:(ConnectionStateResult _Nullable)callback;

Retrieve Share Id

Swift
Objective-C
/**
Returns the share Id to identify the session
*/

func shareId() -> String?
- (NSString * _Nullable)shareId
Swift
Objective-C
/**
Enables or disables the default Co-Browsing UI
*/

func setUIEnabled(_ enabled: Bool)
- (void)setUIEnabled:(Boolean)enabled;

Chatvisor.liveView

Start session

Swift
Objective-C
/**
Starts a new session
*/

func start()
- (void)start;
Swift
Objective-C
/**
Starts a new session

- Parameter result success: shareId: String or failure: Error
*/

func start(_ result: @escaping (LiveView.ChatvisorResult) -> Void)
- (void)start:(void (^ _Nonnull)(ChatvisorResult * _Nonnull))result;

Stop session

Swift
Objective-C
/**
Disconnects the current cobrowsing-session
*/

func stop() -> Void
- (void)stop;

Retrieve connection state

Swift
Objective-C
/**
Returns the current connection state
*/

func connectionState() -> LiveView.ChatvisorConnectionState
- (ChatvisorConnectionState)connectionState;

Monitor connection state

Swift
Objective-C
/**
Registers callback for connection state changes

- Parameter callback: Called when a session connection state changes
*/

func onConnectionStateChange(callback: LiveView.ConnectionStateResult?)
- (void)onConnectionStateChangeWithCallback:(ConnectionStateResult _Nullable)callback;

Retrieve Share Id

Swift
Objective-C
/**
Returns the share Id to identify the session
*/

func shareId() -> String?
- (NSString * _Nullable)shareId;

Tag session

Swift
Objective-C
/**
Tags the current active session with a custom string value

- Parameter tag: Tag name as string
*/

func tag(_ tag: String)
- (void)tag:(NSString * _Nonnull)tag;
Swift
Objective-C
/**
Tags the current active session with a custom string value

- Parameter tag: Tag name as string
- Parameter result: success: Some or failure: Error
*/

func tag(_ tag: String, _ result: @escaping (LiveView.ChatvisorResult) -> Void)
- (void)tag:(NSString * _Nonnull)tag result:(void (^ _Nonnull)(ChatvisorResult * _Nonnull))result;

Chatvisor.liveView.ConnectionStateResult

Swift
/**
Connection state callback typealias
*/

public typealias ConnectionStateResult = (_ state: LiveView.ChatvisorConnectionState) -> Void

Chatvisor.webChat

Show chat

Swift
Objective-C
 /**
Opens the web chat
*/

func open()
- (void)open;
Swift
Objective-C
 /**
Opens the web chat

- Parameter result success: Some or error
*/

func open(_ result: @escaping (LiveView.ChatvisorResult) -> Void)
- (void)open:(void (^ _Nonnull)(ChatvisorResult * _Nonnull))result;

Request notification permissions

Swift
Objective-C
 /**
Asks for notification authorization on the first call.
Registers the application for remote notifications.

Call this function when the permissions should be requested but in any case after initialization.
Notifications can only be received after this function is executed.
*/

func requestNotificationAuthorization() -> Void
- (void)requestNotificationAuthorization;

Forward user opening notification

Swift
Objective-C
 /**
Opens the chatvisor chat for a received notification.

Call this function in application(_:didReceiveRemoteNotification:)
to open the chatvisor chat when the user taps on a chatvisor notification.
*/

func didReceiveRemoteNotification(userInfo: [AnyHashable : Any]) -> Void
- (void)didReceiveRemoteNotificationWithUserInfo:(NSDictionary * _Nonnull)userInfo;

Setup UNUserNotificationCenterDelegate

Swift
Objective-C
 /**
Sets the UNUserNotificationCenter delegate.

Call this function from your application(_:willFinishLaunchingWithOptions:) or
application(_:didFinishLaunchingWithOptions:)
*/

func setupUNUserNotificationCenterDelegate() -> Void
- (void)setupUNUserNotificationCenterDelegate;

Forward notifications when app is in foreground

Swift
Objective-C
 /**
Checks if the chat is already open. If not, it creates a notification.

Call this function in your UNUserNotificationCenter delegate's userNotificationCenter(_:willPresent:withCompletionHandler:).

This function returns true when it handles the notification and calls the completionHandler, false otherwise.
*/

func processesNotification(notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) -> Void
- (BOOL)processesNotificationWithNotification(UNNotification * _Nonnull)notification withCompletionHandler:(void (^ _Nonnull)(UNNotificationPresentationOptions))completionHandler SWIFT_WARN_UNUSED_RESULT;

Initialize Firebase

Swift
Objective-C
 /**
Sets the FirebaseMessaging.FIRMessaging delegate.

Call this function from your application(_:willFinishLaunchingWithOptions:) or
application(_:didFinishLaunchingWithOptions:) if you do already have a custom
UNUserNotificationCenter delegate but no FIRMessaging delegate.

This function is called by initNotifications()
*/

func initFirebase() -> Void
- (void)initFirebase SWIFT_METHOD_FAMILY(none);

Setup Messaging delegate

Swift
Objective-C
 /**
Sets the FirebaseMessaging.FIRMessaging delegate.

Call this function from your application(_:willFinishLaunchingWithOptions:) or
application(_:didFinishLaunchingWithOptions:)
*/

func setupMessagingDelegate() -> Void
- (void)setupMessagingDelegate;

Forward a new device token to the chatvisor SDK

Swift
Objective-C
 /**
Notifies the server about a new mobile device token.
*/

func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: Data) -> Void
- (void)messaging:(FIRMessaging * _Nonnull)messaging didReceiveRegistrationToken:(NSString * _Nonnull)fcmToken;

Chatvisor.user

Tag user

Swift
Objective-C
/**
Tags the current or any following session with the given user information until clear() is called

- Parameter user: ActiveUser instance
*/

tag(_ user: ActiveUser)
- (void)tag:(ActiveUser * _Nonnull)user;
Swift
Objective-C
/**
Tags the current or any following session with the given user information until clear() is called

- Parameter user: ActiveUser instance
- Parameter result: success: Some or failure: Error
*/

tag(_ user: ActiveUser, _ result: @escaping (ChatvisorResult) -> Void)
- (void)tag:(ActiveUser * _Nonnull)user result:(void (^ _Nonnull)(ChatvisorResult * _Nonnull))result;

Clear tag

Swift
Objective-C
 /**
Clears a user tag
*/

func clear() -> Void
- (void)clear;

Chatvisor.conference

Start conference

Swift
Objective-C
/**
Starts a video conference

- Parameter conferenceProperties conference properties with customer id
- Parameter showInviteDialog shows invite dialog before starting a conference
*/

func start(conferenceProperties: ConferenceProperties, showInviteDialog: Bool = false)
- (void)startWithConferenceProperties:(ConferenceProperties * _Nonnull)conferenceProperties showInviteDialog:(BOOL)showInviteDialog = false;
Swift
Objective-C
/**
Starts a video conference

- Parameter conferenceProperties conference properties with customer id
- Parameter showInviteDialog shows invite dialog before starting a conference
- Parameter result: success: Some or failure: Error
*/

func start(conferenceProperties: ConferenceProperties, showInviteDialog: Bool, _ result: @escaping (ChatvisorResult) -> Void)
- (void)startWithConferenceProperties:(ConferenceProperties * _Nonnull)conferenceProperties showInviteDialog:(BOOL)showInviteDialog result:(void (^ _Nonnull)(ChatvisorResult * _Nonnull))result;

Join conference queue

Swift
Objective-C
/**
Joins a video conference

- Parameter conferenceProperties conference properties with customer id
*/

func join(conferenceProperties: ConferenceProperties)
- (void)joinWithConferenceProperties:(ConferenceProperties * _Nonnull)conferenceProperties;
Swift
Objective-C
/**
Joins a video conference

- Parameter conferenceProperties conference properties with customer id
- Parameter result: success: Some or failure: Error
*/

func join(conferenceProperties: ConferenceProperties, _ result: @escaping (ChatvisorResult) -> Void)
- (void)joinWithConferenceProperties:(ConferenceProperties * _Nonnull)conferenceProperties result:(void (^ _Nonnull)(ChatvisorResult * _Nonnull))result;

Check queue status

Swift
Objective-C
/**
Sets a callback for queue status polling. After joining the queue the callback is called every few seconds with the position in the queue.
When the position is -1, the conference should be started by calling start(context, properties).

- Parameter completion pass completion block
*/

func queueStatus(completion: @escaping (Int)->())
- (void)queueStatusWithCompletion:(void (^ _Nonnull)(NSInteger))completion;
← UsageLicenses →
  • SetupConfiguration
    • Additional configuration options
  • Chatvisor
  • Chatvisor.coBrowsing
    • Start session
    • Stop session
    • Retrieve connection state
    • Monitor connection state
    • Retrieve Share Id
  • Chatvisor.liveView
    • Start session
    • Stop session
    • Retrieve connection state
    • Monitor connection state
    • Retrieve Share Id
    • Tag session
  • Chatvisor.liveView.ConnectionStateResult
  • Chatvisor.webChat
    • Show chat
    • Request notification permissions
    • Forward user opening notification
    • Setup UNUserNotificationCenterDelegate
    • Forward notifications when app is in foreground
    • Initialize Firebase
    • Setup Messaging delegate
    • Forward a new device token to the chatvisor SDK
  • Chatvisor.user
    • Tag user
    • Clear tag
  • Chatvisor.conference
    • Start conference
    • Join conference queue
    • Check queue status
MANUALS
User Manual: Sales Suite
Admin Manual: Sales Suite
User Manual: Support Suite
Admin Manual: Support Suite
DEVELOPERS
Integrations
REST API
SDK API
LEGAL
Privacy Policy
Terms and Conditions
Imprint
Engage
Copyright © 2023 Chatvisor GmbH