Skip to main content
Call this method on app startup (e.g., inside @main App struct or SceneDelegate) to initialize the SDK.

Code

Quepass.initializeQuepassSDK(
    baseURL: "https://your-api-base-url.com",
    username: "yourUsername",
    password: "yourPassword",
    channelId: "yourChannelId"
) { status, outputModel in
    if !status {
        let error = outputModel.errors?.first?.message ?? "SDK initialization failed"
        print(error)
        return
    }
        
    Quepass.getCofiguration { configStatus, configOutput in
        if !configStatus {
            let error = configOutput.errors?.first?.message ?? "Failed to fetch configuration"
            print(error)
            return
        }

        // SDK ready
        if let data = configOutput.data {
            let configuration = data["configuration"] as? [String: Any]
            // Use configuration
        }
    }
}
Check the status value before proceeding.