# iOS/iPadOS Functions

Here is a list of functions used when developing in Xcode IDE for iOS.

# initWithViewController

SDK object initialization function.

Parameters:

  • vc – used for initializing the view controller (UIViewController);

  • serverIP – the server and port to connect to in the format <server address>:<server port> (NSString);

  • directConnection (optional) - use of a direct connection (BOOL). Default is YES.

# start

Launching SDK after initialization.

# startWithServersList

Starting the SDK after initialization with a list of servers. The addresses from the provided list are iterated through, and connection is made to the first operational server.

Parameters:

  • serversList – a list of server addresses separated by commas (NSString).

# isStarted

Checking the operational status of the SDK instance, result type boolean.

# stop

Stopping the SDK instance and releasing resources.

# loginAs

Authorization as a specific user with the specified parameters on the server.

Parameters:

  • user - user ID (string);

  • pwd – password (string);

  • encryptPasswordtrue if the password is transmitted in plain text (and the SDK needs to encrypt it), false if it is already encrypted (boolean);

  • enableAutoLogin – whether to automatically authenticate the user with this ID upon re-launch (boolean).

Return value (Bool): true - the authorization request was sent to the server, false - authorization cannot be performed.

# logout

Deauthorization (log out) of an account without disconnecting the SDK from the video conferencing server.

Return value (Bool): true - the deauthorization request was sent to the server, false - deauthorization could not be performed.

# callTo

Call the specified subscriber.

Parameters:

  • userTrueConf ID of the called party (string).

Return value (Bool): true - the call was sent to the server, false - the call cannot be made.

# joinConf

Joining a group conference.

Parameters:

  • conf_IDconference ID (string).

  • pwd (optional) – password for entering the conference (String);

Return value (Bool): true if the call was sent to the server, false if the call could not be made.

# hangup

Ending the current call or conference.

Parameters:

  • forAll (optional) – in the case of a conference, whether it should be terminated for all participants if the required permissions are present (Bool). The default is true.

Return value (Bool): true - the call can be terminated, false - the call cannot be terminated (usually due to an incorrect state).

# acceptCall

Answering an incoming call.

Parameters:

  • accept – accept or decline a call (Bool).

Return value (Bool): true - a response to the request is possible, false - a response is not possible.

The function receives a command as a string, containing instructions on which account to authenticate and which call to make. It then automatically executes all these operations. If execution of the command is halted at any stage.

Parameters:

  • cmd - the string being processed (string).

# scheduleLoginAs

Retrieving a list of operations that need to be performed sequentially, including the server for connection, account credentials, and the recipient's call address. This is equivalent to the function parseProtocolLink, where the parameters are passed individually rather than as a protocol string. String parameters can be empty.

Parameters:

  • login – user ID (string);

  • pwd – password (string);

  • encryptPasswordtrue if the password is transmitted in plain text (and needs to be encrypted by the SDK), false if it is already encrypted (Bool);

  • callToUser – identifier of the called user (string);

  • autoClose – whether to close the server session after completing or interrupting a call (Bool);

  • loginTemp – indicates a temporary login. It means that the client should be deauthorized after the call (Bool);

  • loginForce – forced login. Authentication will proceed even if the client is already logged in to the server (Bool);

  • domain - the domain in which the automatic server search will be performed (string);

  • serversList – a list of servers to connect to (string);

  • isPublic is a parameter indicating that callToUser is the name of the conference, not the user's name. If this parameter is incorrect, the call to the user or connection to the conference will not be completed (Bool).

# muteMicrophone

Changing the microphone status.

Parameters:

  • mute – the state to set the microphone to: true – off, false – on (Bool).

# muteCamera

Camera status change.

Parameters:

  • mute – the state to which the camera should be set: true – off, false – on (Bool).

# muteAudio

Changing the speaker status.

Parameters:

  • mute – the state to set for the speaker: true – muted, false – unmuted (Bool).

# getMyId

Getting your own ID.

Return value (String): the current user's identifier in the system. If the user is not authenticated on the server, nil is returned.

# getMyName

Obtaining a custom name for display in the interface.

Return value (String): the name of the current user. Contains nil if the user is not authorized on the server.

# isConnectedToServer

Checking the connection to the server.

Return value (Bool): true - connection to the server is established, false - no connection.

# isLoggedIn

Checking authorization status.

Return value (Bool): true - the user is authenticated on the server, false - the user is not authenticated.

# isInConference

Checking conference presence.

Return value (Bool): true - the client is in a conference, false - the client is not in a conference.

# getUserStatus

Retrieving another user's status. If the status is known, it is returned immediately. If not, the status is requested from the server, and the client subscribes to receive notifications of any changes.

Parameters:

  • user – the TrueConf ID of the user whose status is being requested (string).

Return value (UserPresStatus): the user's current status.

# isMicrophoneMuted

Microphone status check.

Return value (Bool): true - disabled, false - enabled.

# isCameraMuted

Camera status check.

Return value (Bool): true - disabled, false - enabled.

# isAudioMuted

Checking the speaker status.

Return value (Bool): true - disabled, false - enabled.

# acceptRecord

Response to an incoming video recording request.

Parameters:

  • accept - accept or decline the video recording request (Bool);

  • userIDTrueConf ID of the user to whom the response to the request is given (string).

# sendChatMessage

Sending a text message.

Parameters:

  • toID – (string) the TrueConf ID of the user to whom the message is being sent (it is recommended to use the full ID in the format user@server.name). To send a message to the chat of the current group conference, this parameter should be left empty.

  • text – message text (string);

Return value (Bool): true - the message was sent to the server, false - the message could not be sent due to a lack of connection with the server.

# setNewExtraButtons

Adding additional buttons to the conference control panel. The buttons will be added to the menu that opens when tapping the ellipsis button, in the order they appear in the provided array. See Example 5.

Parameters:

  • btns – an array of TCSDKExtraButton objects (NSArray).

# presentViewController

Presentation of another UIViewController on top of the conference window.

Parameters:

  • viewControllerToPresent – the window for presentation (UIViewController);

  • flag - animation of the presentation process (Bool);

  • popoverFrom - the element over which the presentation will be performed (Any). You can specify nil for this parameter; in this case, if the presentation style UIModalPresentationPopover is specified, UIModalPresentationFullScreen will be enforced.

  • completion - a block that will be executed after the presentation ends. You can specify nil for this parameter.

# getUserName

Retrieving the display name of another user.

Parameters:

  • user – the TrueConf ID of the user whose name is being requested (String).

Return value (String): user name.

# getAudioDeviceList

Retrieving the current list of audio output devices.

Return value (TCSDKAudioDevice array): an array of audio output devices.

# audioDevice

A property for getting and setting the current audio output device.

Type: TCSDKAudioDevice

# resources

Property for setting the resource bundle. It is used to replace standard images with custom ones.

Type: NSBundle

# swapCamera

Switching the camera from front to rear and vice versa.

# xview

A property for setting the parent element for the window where other conference participants are located.

Type: UIView

# xsview

A property to set the parent element for the self-view window.

Type: UIView

# joinWithMic

Property to set the default microphone state when joining a conference. The default value is true.

Type: Bool

# joinWithVideo

Property to set the default camera state when joining a conference. Defaults to true.

Type: Bool

# hideConfControls

A property for setting the default state of the bottom panel with conference control elements. The default is false.

Type: Bool

# windowsDelegate

A property for implementing the TCWindowsDelegate protocol methods.

# tcWindowsGetPlaces

The TCWindowsDelegate protocol method is used to adjust the size and coordinates of the video windows of other conference participants. It is called automatically when the SDK needs to rearrange the received video from other participants.

Parameters:

  • aWindows is an array of conference participants' video windows of the TCSDKWindowRect type. For each of these objects, you can modify the properties CGRect rect, CGSize resolution, and String userId.

  • aSize – window coordinates (CGSize)

Return value: an array of TCSDKWindowRect objects.