Rate this page:

VIClient

Interface that may be used to connect and login to Voximplant Cloud, make and receive audio/video calls.

Methods

callConference:settings:

Copy URL
- (

nullable VICall *

)callConference:(

NSString *

)conference
settings:(

VICallSettings *

)settings

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

Parameters

  • conference:

    NSString *

    The 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 preferred video codec, custom data, extra headers etc.

Returns

call:settings:

Copy URL
- (

nullable VICall *

)call:(

NSString *

)number
settings:(

VICallSettings *

)settings

Create a new call instance. The call must be then started using [VICall start].

Parameters

  • number:

    NSString *

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

  • settings:

    VICallSettings *

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

Returns

clientVersion

Static
Copy URL
+ (

NSString *

)clientVersion

Get client version.

Returns

  • type:

    NSString *

connect

Copy URL
- (

BOOL

)connect

Connect to the Voximplant Cloud.

Returns

  • type:

    BOOL

connectWithConnectivityCheck:gateways:

Copy URL
- (

BOOL

)connectWithConnectivityCheck:(

BOOL

)connectivityCheck
gateways:(

nullable NSArray *

)gateways

Connect to the Voximplant Cloud.

Parameters

  • connectivityCheck:

    BOOL

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

  • gateways:

    nullable NSArray *

    Array of server names of particular media gateways for connection.

Returns

  • type:

    BOOL

disconnect

Copy URL
- (

void

)disconnect

Disconnect from the Voximplant Cloud.

Returns

  • type:

    void

handlePushNotification:

Copy URL
- (

nullable NSUUID *

)handlePushNotification:(

nullable NSDictionary *

)notification

Handle an incoming push notification.

Parameters

Returns

  • type:

    nullable NSUUID *

initWithDelegateQueue:

Copy URL
- (

instancetype

)initWithDelegateQueue:(

dispatch_queue_t

)queue

Initialize client instance.

Parameters

  • queue:

    dispatch_queue_t

    All delegates methods will be called on this queue. Queue should be serial, but not concurrent (main queue is applicable).

Returns

  • type:

    instancetype

initWithDelegateQueue:bundleId:

Copy URL
- (

instancetype

)initWithDelegateQueue:(

dispatch_queue_t

)queue
bundleId:(

nullable NSString *

)bundleId

Initialize a client instance.

You need to use this only if you are going to send push notifications across several iOS apps using a single Voximplant application.

Parameters

  • queue:

    dispatch_queue_t

    All delegates methods will be called on this queue. Queue should be serial, but not concurrent (main queue is applicable).

  • bundleId:

    nullable NSString *

    Application bundle id

Returns

  • type:

    instancetype

loginWithUser:oneTimeKey:success:failure:

Copy URL
- (

void

)loginWithUser:(

NSString *

)user
oneTimeKey:(

NSString *

)oneTimeKey
success:(

nullable VILoginSuccess

)success
failure:(

nullable VILoginFailure

)failure

Login to the Voximplant Cloud using one time key.

Parameters

  • user:

    NSString *

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

  • oneTimeKey:

    NSString *

    Hash that was generated using following formula:

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

    Please note that here user is just a user name, 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 triggered if operation is completed successfully.

  • failure:

    nullable VILoginFailure

    Completion handler failure triggered if operation is failed.

Returns

  • type:

    void

loginWithUser:password:success:failure:

Copy URL
- (

void

)loginWithUser:(

NSString *

)user
password:(

NSString *

)password
success:(

nullable VILoginSuccess

)success
failure:(

nullable VILoginFailure

)failure

Login to the Voximplant Cloud using password.

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 triggered if operation is completed successfully.

  • failure:

    nullable VILoginFailure

    Completion handler failure triggered if operation is failed.

Returns

  • type:

    void

loginWithUser:token:success:failure:

Copy URL
- (

void

)loginWithUser:(

NSString *

)user
token:(

NSString *

)token
success:(

nullable VILoginSuccess

)success
failure:(

nullable VILoginFailure

)failure

Login to the Voximplant Cloud using access token.

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 triggered if operation is completed successfully.

  • failure:

    nullable VILoginFailure

    Completion handler failure triggered if operation is failed.

Returns

  • type:

    void

refreshTokenWithUser:token:result:

Copy URL
- (

void

)refreshTokenWithUser:(

NSString *

)user
token:(

NSString *

)token
result:(

nullable VIRefreshTokenResult

)result

Perform refresh of login tokens required for login using 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 that is triggered when the operation is completed.

Returns

  • type:

    void

registerIMPushNotificationsToken:completion:

Copy URL
- (

void

)registerIMPushNotificationsToken:(

NSData *

)imToken
completion:(

nullable VICompletionBlock

)completion

Register an Apple Push Notifications token.

After calling this function application will receive push notifications from Voximplant Server. If the provided token is not nil, but the client is not logged in, the token will be registered just after login.

Parameters

  • imToken:

    NSData *

    The 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.

See Available Roles
- (

BOOL

)registerPushNotificationsToken:(

nullable NSData *

)voipToken
imToken:(

nullable NSData *

)imToken

Register an Apple Push Notifications token.

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

Parameters

Returns

  • type:

    BOOL

registerVoIPPushNotificationsToken:completion:

Copy URL
- (

void

)registerVoIPPushNotificationsToken:(

NSData *

)voipToken
completion:(

nullable VICompletionBlock

)completion

Register an Apple Push Notifications token.

After calling this function application will receive push notifications from Voximplant Server. If the provided token is not nil, but the client is not logged in, the token will be registered just after login.

Parameters

Returns

  • type:

    void

requestOneTimeKeyWithUser:result:

Copy URL
- (

void

)requestOneTimeKeyWithUser:(

NSString *

)user
result:(

VIOneTimeKeyResult

)result

Generates one time login key to be used for 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 that is triggered when the operation is completed.

Returns

  • type:

    void

setLogDelegate:

Static
Copy URL
+ (

void

)setLogDelegate:(

id<VILogDelegate>

)logDelegate

Set log delegate to handle Voximplant iOS SDK log messages.

Parameters

Returns

  • type:

    void

setLogLevel:

Static
Copy URL
+ (

void

)setLogLevel:(

VILogLevel

)logLevel

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

Parameters

Returns

  • type:

    void

unregisterIMPushNotificationsToken:completion:

Copy URL
- (

void

)unregisterIMPushNotificationsToken:(

NSData *

)imToken
completion:(

nullable VICompletionBlock

)completion

Unregister an Apple Push Notifications token.

After calling this function application stops receive push notifications from Voximplant Server. If the provided token is not nil, but the client is not logged in, the token will be unregistered just after login.

Parameters

  • imToken:

    NSData *

    The 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.

See Available Roles
- (

BOOL

)unregisterPushNotificationsToken:(

nullable NSData *

)voipToken
imToken:(

nullable NSData *

)imToken

Unregister an Apple Push Notifications token.

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

Parameters

Returns

  • type:

    BOOL

unregisterVoIPPushNotificationsToken:completion:

Copy URL
- (

void

)unregisterVoIPPushNotificationsToken:(

NSData *

)voipToken
completion:(

nullable VICompletionBlock

)completion

Unregister an Apple Push Notifications token.

After calling this function application stops receive push notifications from Voximplant Server. If the provided token is not nil, but the client is not logged in, the token will be unregistered just after login.

Parameters

Returns

  • type:

    void

webrtcVersion

Static
Copy URL
+ (

NSString *

)webrtcVersion

Get underlying WebRTC version.

Returns

  • type:

    NSString *

Props

callManagerDelegate

Copy URL
@property (weak, nullable, nonatomic) 

id<VIClientCallManagerDelegate>

callManagerDelegate

Call manager delegate that handles incoming calls.

calls

Copy URL
@property (strong, readonly, nonatomic) 

NSDictionary<NSString *, VICall *> *

calls

Dictionary of actual calls with their ids.

Returns

  • type:

    NSDictionary<NSString *, VICall *> *

clientState

Copy URL
@property (readonly, nonatomic) 

VIClientState

clientState

Current client state.

Returns

enableForceRelayTraffic

Copy URL
@property (assign, nonatomic) 

BOOL

enableForceRelayTraffic

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
@property (assign, nonatomic) 

BOOL

enableVideoAdaptation

A Boolean value that determines 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
@property (strong, readonly, nonatomic) 

VIMessenger *

messenger

Get the instance of messaging subsystem.

Messenger instance.

Returns

sessionDelegate

Copy URL
@property (weak, nullable, nonatomic) 

id<VIClientSessionDelegate>

sessionDelegate

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

Returns