Skip to navigation

VICore

VoximplantCore · iOS SDK v3

View as Markdown

Entry point to the SDK.

@objc final class VICore

Properties

delegateQueue

@objc static var delegateQueue: DispatchQueue

All delegate methods are to be called on this queue.

The queue should be serial (the main queue is applicable). Voximplant serial queue is set by default. It is recommended to specify this queue before you start working with the SDK and not to change it after. Changing the queue while calling API methods may result in unexpected behavior.

Methods

configureFileLogger(_:)

@objc static func configureFileLogger(_ configuration: VIFileLoggerConfiguration) -> Bool

Configures the SDK file logger.

Parameters

configuration VIFileLoggerConfiguration

File logger configuration. Any changes to the VIFileLoggerConfiguration object after calling this method have no effect.

Return Value

true if the file logger is configured successfully; otherwise, false.

If the file logger is not configured, the SDK does not write logs to a file.

This method is provided for Objective-C compatibility and returns a boolean status without detailed error context. For the Swift code, prefer using tryConfigureFileLogger(_:), which throws errors with detailed information.

configureLogger(logDelegate:logLevel:withTimestamps:)

@objc static func configureLogger(
    logDelegate: VILogDelegate? = nil,
    logLevel: VILogLevel,
    withTimestamps: Bool = true
)

Configures the SDK logger.

Parameters

logDelegate VILogDelegate?

Logging delegate. If nil, the configuration applies only for Xcode output logs. The default value is nil.

logLevel VILogLevel

Log level

withTimestamps Bool

Whether a log message should include the timestamp. Timestamp includes date and time with microseconds in a device’s time zone. The default value is true.

If the SDK logger is not configured or the API is called after VIClient is initialized, VILogLevel.info is used for Xcode output.

tryConfigureFileLogger(_:)

static func tryConfigureFileLogger(
    _ configuration: VIFileLoggerConfiguration
) throws(VIFileLoggerError)

Configures the SDK file logger.

Parameters

configuration VIFileLoggerConfiguration

File logger configuration. Any changes to the VIFileLoggerConfiguration object after calling this method have no effect.

If the file logger is not configured, the SDK does not write logs to a file.

Throws

VIFileLoggerError if file logger configuration fails.

Relationships

Inherits From: NSObject

Conforms To: ObjectiveC.NSObjectProtocol, Swift.CVarArg, Swift.CustomDebugStringConvertible, Swift.CustomStringConvertible, Swift.Equatable, Swift.Hashable