• 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

Flutter

  • Overview
  • Installation
  • Usage
  • Reference

Capacitor

  • 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;
Swift
Objective-C
/**
Set the background color of the overlay in co-browsing
*/

func setOverlayBackgroundColor(_ overlayBackgroundColor: UIColor)
- (void)setOverlayBackgroundColor:(UIColor * _Nonnull)overlayBackgroundColor;
Swift
Objective-C
/**
Set the control buttons color of the overlay in co-browsing
*/

func setControlsColor(_ controlsColor: UIColor)
- (void)setControlsColor:(UIColor * _Nonnull)cdnUrl;
Swift
Objective-C
/**
Set sharing configuration
*/

func setSharingConfiguration(_ sharingConfig: SetupSharingConfiguration?)
- (void)setSharingConfiguration:(SetupSharingConfiguration * _Nonnull)sharingConfig;

SetupSharingConfiguration

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

- Parameter appGroupId: App group ID eg. "group.[domain].[yourcompany].[yourapp]". Visit
https://developer.apple.com/documentation/xcode/configuring-app-groups for more information.
*/

public init(appGroupId: String)
- (nonnull instancetype)initWithAppGroupId:(NSString * _Nonnull)appGroupId;
Swift
Objective-C
/**
- Enables sharing and retrieving Co-Browsing sessions from the App group container. Default: false

Sessions are shared between different apps belogining to the same App group on the same device. When enabled,
Co-Browsing session will be shared with the App group on session start and deleted on session end by the initiator app.
Another app belonging to the same App group can retrieve the session and join it.
*/

var sessionSharingEnabled: Bool
@property (nonatomic, assign) BOOL sessionSharingEnabled;

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;

Join existing session

Swift
Objective-C
/**
Joins existing session

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

func join(session: SharedSession, _ result: @escaping (ChatvisorResult) -> Void)
- (void)join:(SharedSession*)session (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

Retrieve shared session

Swift
Objective-C
/**
Returns a Co-Browsing SharedSession instance if one exists within the App group or nil. SetupConfiguration must be configured with
an instance of SetupSharingConfiguration to enable this functionality. Sessions are shared with the App group when Co-Browsing
session starts and deleted when session ends by the session initiator app.
*/

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

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

SharedSession

Swift

// Shared session descriptor object

/**
- Shared session ID.
*/

sessionId: String

/**
- Share ID. User / operator friendly version of sessionId
*/

shareId: String

/**
- Bundle ID of the session initiator app
*/

initiatorBundleId: String

/**
- CFBundleName of the session initiator app
*/

initiatorName: String

/**
- Date at which session started
*/

startedAt: Date

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;

Join existing session

Swift
Objective-C
/**
Joins existing session

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

func join(session: SharedSession, _ result: @escaping (ChatvisorResult) -> Void)
- (void)join:(SharedSession*)session (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;

Retrieve shared session

Swift
Objective-C
/**
Returns a SharedSession instance if one exists within the App group
*/

func sharedSession() -> SharedSession?
- (SharedSession * _Nullable)sharedSession

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
  • SetupSharingConfiguration
  • Chatvisor
  • Chatvisor.coBrowsing
    • Start session
    • Join existing session
    • Stop session
    • Retrieve connection state
    • Monitor connection state
    • Retrieve Share Id
    • Retrieve shared session
    • SharedSession
  • Chatvisor.liveView
    • Start session
    • Join existing session
    • Stop session
    • Retrieve connection state
    • Monitor connection state
    • Retrieve Share Id
    • Retrieve shared session
    • 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 © 2024 TeamViewer Austria GmbH