VoiceSDK

public final class VoiceSDK

VoiceSDK is an SDK facade object. The inception point of all communications between client and SDK.

Properties

Initializers

  • The preinit() function prepares the SDK for receiving VoIP push notifications.

    Note

    The application should call this function asap in application(_:didFinishLaunchingWithOptions:). But even so, it is recommended to setup logMessageCallback in the first place.

    Declaration

    Swift

    public class func preinit()
  • The shared is a reference on a VoiceSDK singleton (SDK facade object).

    Declaration

    Swift

    public static let shared: VoiceSDK

Functions

  • The activate(completion:) function creates (setup) the internal SDK components. It should be called by app on user login (autologin) completion.

    Declaration

    Swift

    public func activate(completion: @escaping (_ result: Result<Void, ErrorType>) -> Void)

    Parameters

    completion

    The completion is called on main thread.

    result

    It contains the SDK activation result.

  • The deactivate(completion:) function destroys the internal SDK components. It should be called by app upon user logout.

    Declaration

    Swift

    public func deactivate(completion: @escaping (_ result: Result<Void, ErrorType>) -> Void)

    Parameters

    completion

    The completion is called on main thread.

    result

    It contains the SDK deactivation result.

  • The placeCall(with:completion) function places outgoing call.

    Precondition

    The VoiceSDK object should be in active state.

    Declaration

    Swift

    public func placeCall(with parameters: OutgoingCallParameters,
                          completion: @escaping (_ result: Result<VoiceCall, ErrorType>) -> Void)

    Parameters

    parameters

    It specifies destination contact (callee), call type, etc.

    completion

    The completion is called on main thread.

    result

    The result contains VoiceCall object in case of success, ErrorType value in case of failure.

  • The updatePhoneNumber(:) function updates phone number.

    Declaration

    Swift

    public func updatePhoneNumber(_ number: String?,
                                  completion: @escaping (_ result: Result<Void, ErrorType>) -> Void)

    Parameters

    number

    It updates (sets) the current device phone number.

    completion

    The completion is called on main thread.

    result

    The result is either success or failure with ErrorType value.

  • The updateInboundCallPath(:) function updates inbound call path.

    Declaration

    Swift

    public func updateInboundCallPath(_ path: InboundCallPath,
                                      completion: @escaping (_ result: Result<Void, ErrorType>) -> Void)

    Parameters

    path

    It updates (sets) the current prefered path for receiving the incoming call on this device.

    completion

    The completion is called on main thread.

    result

    The result is either success or failure with ErrorType value.

  • The version() function returns Voice SDK version.

    Declaration

    Swift

    @discardableResult
    public func version() -> String

    Return Value

    The string value indicating the Voice SDK version.

  • The voiceStackVersion() function returns version of Voice Stack used by Voice SDK.

    Declaration

    Swift

    @discardableResult
    public func voiceStackVersion() -> String

    Return Value

    The string value indicating the version or Voice Stack.

Callbacks

Notifications

Nested Type

  • VoiceSDK object state

    See more

    Declaration

    Swift

    public enum State : Equatable, CustomStringConvertible