← Back to Documentation Home

STRUCT

OmniconvertSDK

public struct OmniconvertSDK

Main SDK module providing convenient access to all components

Properties

version

public static let version = "1.0.0"

SDK version

name

public static let name = "OmniconvertSDK-iOS"

SDK name

Methods

createClient(apiKey:userId:sessionParams:baseUrl:cacheBypass:)

public static func createClient(
    apiKey: String,
    userId: String,
    sessionParams: SessionParams = SessionParams(),
    baseUrl: String = "https://app.omniconvert.com/",
    cacheBypass: Bool = false
) -> ExploreClient

Create a new ExploreClient with default configuration - Parameters: - apiKey: The API key for authentication - userId: Unique user identifier - sessionParams: Session parameters for the user - baseUrl: Optional base URL for the API (defaults to production) - cacheBypass: Whether to bypass cache (for development) - Returns: Configured ExploreClient instance

Parameters

Name Description
apiKey The API key for authentication
userId Unique user identifier
sessionParams Session parameters for the user
baseUrl Optional base URL for the API (defaults to production)
cacheBypass Whether to bypass cache (for development)

createCustomClient(httpClient:storage:userProvider:config:decisionManager:tracker:logger:)

public static func createCustomClient(
    httpClient: HttpClientProtocol,
    storage: StorageFacadeProtocol,
    userProvider: UserProviderProtocol,
    config: ClientConfig? = nil,
    decisionManager: DecisionManagerProtocol? = nil,
    tracker: TrackerProtocol? = nil,
    logger: LoggerProtocol? = nil
) -> ExploreClient

Create a new ExploreClient with custom components - Parameters: - httpClient: Custom HTTP client implementation - storage: Custom storage facade implementation - userProvider: Custom user provider implementation - config: Optional custom configuration - decisionManager: Optional custom decision manager - tracker: Optional custom tracker - logger: Optional custom logger - Returns: Configured ExploreClient instance

Parameters

Name Description
httpClient Custom HTTP client implementation
storage Custom storage facade implementation
userProvider Custom user provider implementation
config Optional custom configuration
decisionManager Optional custom decision manager
tracker Optional custom tracker
logger Optional custom logger

setGlobalLogger(_:)

public static func setGlobalLogger(_ logger: LoggerProtocol)

Configure global logger - Parameter logger: Logger implementation to use globally

Parameters

Name Description
logger Logger implementation to use globally

setDebugLogging(_:)

public static func setDebugLogging(_ enabled: Bool)

Enable debug logging - Parameter enabled: Whether to enable debug logging

Parameters

Name Description
enabled Whether to enable debug logging

getSDKInfo()

public static func getSDKInfo() -> [String: String]

Get SDK information - Returns: Dictionary containing SDK information