Rate this page:

VIClient

Interface that provides API to connect and log in to the Voximplant Cloud, make and receive audio/video calls.

Methods

callConference:settings:

Copy URL
callConference:settings:(conference: 

NSString *

,
settings:

VICallSettings *

):

nullable VICall *

Creates a call to a dedicated conference without proxy session. The call must be then started via [VICall start]. For details see the video conferencing guide.

Parameters

  • conference:

    NSString *

    Number to call. For SIP compatibility reasons it should be a non-empty string even if the number itself is not used by a Voximplant cloud scenario

  • settings:

    VICallSettings *

    Call settings with additional call parameters, such as the preferred video codec, custom data, extra headers etc.

Returns

call:settings:

Copy URL
call:settings:(number: 

NSString *

,
settings:

VICallSettings *

):

nullable VICall *

Creates a new call instance. The call must be then started via [VICall start].

Parameters

  • number:

    NSString *

    SIP URI, username or phone number to make call to. Actual routing is then performed by a VoxEngine scenario

  • settings:

    VICallSettings *

    Call settings with additional call parameters, such as the preferred video codec, custom data, extra headers etc.

Returns

clientVersion

Static
Copy URL
clientVersion(): 

NSString *

Gets the SDK version.

Returns

  • type:

    NSString *

connectTo:

Copy URL
connectTo:(node: 

VIConnectionNode

):

BOOL

Connects to the Voximplant Cloud. Connectivity check is disabled.

Parameters

Returns

  • type:

    BOOL

connectTo:connectivityCheck:gateways:

Copy URL
connectTo:connectivityCheck:gateways:(node: 

VIConnectionNode

,
connectivityCheck:

BOOL

,
gateways:

nullable NSArray *

):

BOOL

Connects to the Voximplant Cloud.

Parameters

  • Node the Voximplant account belongs to. Find more information about VIConnectionNode in the getting started guide

  • connectivityCheck:

    BOOL

    Checks whether UDP traffic flows correctly between the device and the Voximplant Cloud. This check reduces connection speed

  • gateways:

    nullable NSArray *

    List of the media gateway servers for connection

Returns

  • type:

    BOOL

disconnect

Copy URL
disconnect(): 

void

Disconnects from the Voximplant Cloud.

Returns

  • type:

    void

handlePushNotification:

Copy URL
handlePushNotification:(notification: 

nullable NSDictionary *

):

nullable NSUUID *

Handles an incoming push notification.

Parameters

Returns

  • type:

    nullable NSUUID *

initWithDelegateQueue:

Copy URL
initWithDelegateQueue:(queue: 

dispatch_queue_t

):

instancetype

Initializes a client instance.

Parameters

  • queue:

    dispatch_queue_t

    All delegate methods are to be called on this queue. The queue should be serial, but not concurrent (the main queue is applicable)

Returns

  • type:

    instancetype

initWithDelegateQueue:bundleId:

Copy URL
initWithDelegateQueue:bundleId:(queue: 

dispatch_queue_t

,
bundleId:

nullable NSString *

):

instancetype

Initializes a client instance.

Use this API only if you are going to send push notifications across several iOS apps via a single Voximplant application.

Parameters

  • queue:

    dispatch_queue_t

    All delegate methods are to be called on this queue. The queue should be serial, but not concurrent (the main queue is applicable)

  • bundleId:

    nullable NSString *

    Application bundle id

Returns

  • type:

    instancetype

loginWithUser:oneTimeKey:success:failure:

Copy URL
loginWithUser:oneTimeKey:success:failure:(user: 

NSString *

,
oneTimeKey:

NSString *

,
success:

nullable VILoginSuccess

,
failure:

nullable VILoginFailure

):

void

Logs in a user with a one time key to the Voximplant Cloud.

Parameters

  • user:

    NSString *

    Full user name, including app and account name, like someuser@someapp.youraccount.voximplant.com

  • oneTimeKey:

    NSString *

    Hash that has been generated via the following formula:

    MD5(oneTimeKey+"|"+MD5(user+":voximplant.com:"+password))
    

    Please note that the user field is a username only, without app name, account name or anything else after "@".

    So if you pass myuser@myapp.myacc.voximplant.com as a username, you should only use myuser while computing this hash.

  • success:

    nullable VILoginSuccess

    Completion handler to be triggered if the operation is completed successfully

  • failure:

    nullable VILoginFailure

    Completion handler to be triggered if the operation is failed

Returns

  • type:

    void

loginWithUser:password:success:failure:

Copy URL
loginWithUser:password:success:failure:(user: 

NSString *

,
password:

NSString *

,
success:

nullable VILoginSuccess

,
failure:

nullable VILoginFailure

):

void

Logs in a user with a password to the Voximplant Cloud.

Parameters

  • user:

    NSString *

    Full user name, including app and account name, like someuser@someapp.youraccount.voximplant.com

  • password:

    NSString *

    User password

  • success:

    nullable VILoginSuccess

    Completion handler to be triggered if the operation is completed successfully

  • failure:

    nullable VILoginFailure

    Completion handler to be triggered if the operation is failed

Returns

  • type:

    void

loginWithUser:token:success:failure:

Copy URL
loginWithUser:token:success:failure:(user: 

NSString *

,
token:

NSString *

,
success:

nullable VILoginSuccess

,
failure:

nullable VILoginFailure

):

void

Logs in a user with an access token to the Voximplant Cloud.

Parameters

  • user:

    NSString *

    Full user name, including app and account name, like someuser@someapp.youraccount.voximplant.com

  • token:

    NSString *

    Access token obtained from authParams

  • success:

    nullable VILoginSuccess

    Completion handler to be triggered if the operation is completed successfully

  • failure:

    nullable VILoginFailure

    Completion handler to be triggered if the operation is failed

Returns

  • type:

    void

refreshTokenWithUser:token:result:

Copy URL
refreshTokenWithUser:token:result:(user: 

NSString *

,
token:

NSString *

,
result:

nullable VIRefreshTokenResult

):

void

Performs refresh of login tokens required for login via access token.

Parameters

  • user:

    NSString *

    Full user name, including app and account name, like someuser@someapp.youraccount.voximplant.com

  • token:

    NSString *

    Refresh token obtained from authParams

  • result:

    nullable VIRefreshTokenResult

    Completion handler after the operation is completed

Returns

  • type:

    void

registerIMPushNotificationsToken:completion:

Copy URL
registerIMPushNotificationsToken:completion:(imToken: 

NSData *

,
completion:

nullable VICompletionBlock

):

void

Registers Apple Push Notifications tokens.

After calling this API application can receive push notifications from the Voximplant Cloud. If the provided token is not nil, but the client is not logged in, the token is to be registered just after login.

Parameters

  • imToken:

    NSData *

    APNS token for IM push notifications

  • completion:

    nullable VICompletionBlock

    Completion block to handle the result of the operation

Returns

  • type:

    void

registerPushNotificationsToken:imToken:

Deprecated
Copy URL

Use [VIClient registerVoIPPushNotificationsToken:completion:] and [VIClient registerIMPushNotificationsToken:completion:] instead.

registerPushNotificationsToken:imToken:(voipToken: 

nullable NSData *

,
imToken:

nullable NSData *

):

BOOL

Registers Apple Push Notifications tokens.

After calling this API application can receive push notifications from the Voximplant Cloud. If the provided tokens are not nil, but the client is not logged in, the tokens are to be registered just after login, despite the API returns NO.

Parameters

Returns

  • type:

    BOOL

registerVoIPPushNotificationsToken:completion:

Copy URL
registerVoIPPushNotificationsToken:completion:(voipToken: 

NSData *

,
completion:

nullable VICompletionBlock

):

void

Registers Apple VoIP Push Notifications tokens.

After calling this API application can receive push notifications from the Voximplant Cloud. If the provided token is not nil, but the client is not logged in, the token is to be registered just after login.

Parameters

Returns

  • type:

    void

requestOneTimeKeyWithUser:result:

Copy URL
requestOneTimeKeyWithUser:result:(user: 

NSString *

,
result:

VIOneTimeKeyResult

):

void

Generates a one time login key to use in automated login process.

For additional information please see:

Parameters

  • user:

    NSString *

    Full user name, including app and account name, like someuser@someapp.youraccount.voximplant.com

  • Completion handler after the operation is completed

Returns

  • type:

    void

setLogDelegate:

Static
Copy URL
setLogDelegate:(logDelegate: 

id<VILogDelegate>

):

void

Sets a log delegate to handle the Voximplant iOS SDK log messages.

Parameters

Returns

  • type:

    void

setLogLevel:

Static
Copy URL
setLogLevel:(logLevel: 

VILogLevel

):

void

Sets a level for log messages. This method must be called before creating an SDK object instance.

Parameters

Returns

  • type:

    void

unregisterIMPushNotificationsToken:completion:

Copy URL
unregisterIMPushNotificationsToken:completion:(imToken: 

NSData *

,
completion:

nullable VICompletionBlock

):

void

Unregisters Apple Push Notifications tokens.

After calling this API application cannot receive push notifications from the Voximplant Cloud. If the provided token is not nil, but the client is not logged in, the token is to be unregistered just after login.

Parameters

  • imToken:

    NSData *

    APNS token for IM push notification

  • completion:

    nullable VICompletionBlock

    Completion block to handle the result of the operation

Returns

  • type:

    void

unregisterPushNotificationsToken:imToken:

Deprecated
Copy URL

Use [VIClient unregisterVoIPPushNotificationsToken:completion:] and [VIClient unregisterIMPushNotificationsToken:completion:] instead.

unregisterPushNotificationsToken:imToken:(voipToken: 

nullable NSData *

,
imToken:

nullable NSData *

):

BOOL

Unregisters Apple Push Notifications tokens.

After calling this API application cannot receive push notifications from the Voximplant Cloud. If the provided tokens are not nil, but the client is not logged in, the tokens are to be unregistered just after login, despite the API returns NO.

Parameters

Returns

  • type:

    BOOL

unregisterVoIPPushNotificationsToken:completion:

Copy URL
unregisterVoIPPushNotificationsToken:completion:(voipToken: 

NSData *

,
completion:

nullable VICompletionBlock

):

void

Unregisters Apple VoIP Push Notifications tokens.

After calling this API application cannot receive push notifications from the Voximplant Cloud. If the provided token is not nil, but the client is not logged in, the token is to be unregistered just after login.

Parameters

Returns

  • type:

    void

webrtcVersion

Static
Copy URL
webrtcVersion(): 

NSString *

Gets the underlying WebRTC version.

Returns

  • type:

    NSString *

Props

callManagerDelegate

Copy URL
callManagerDelegate: 

Call manager delegate that handles incoming call events.

calls

Copy URL
calls: 

Dictionary of actual calls with their ids.

Returns

  • type:

    NSDictionary<NSString *, VICall *> *

clientState

Copy URL
clientState: 

Current client state.

Returns

enableForceRelayTraffic

Copy URL
enableForceRelayTraffic: 

Whether to force traffic to go through TURN servers

Setting this property enables or disables traffic to go through TURN servers for all calls since next call.

Default is NO.

Returns

  • type:

    BOOL

enableVideoAdaptation

Copy URL
enableVideoAdaptation: 

Whether a video adaptation for CPU usage and current bandwidth is enabled.

Setting this property enables or disables video adaptation for all calls since next call.

Default is YES.

Returns

  • type:

    BOOL

messenger

Copy URL
messenger: 

Gets the instance of messaging subsystem.

Messenger instance.

Returns

sessionDelegate

Copy URL
sessionDelegate: 

Session delegate that handles events for the connection with the Voximplant Cloud.

Returns