Import the framework wherever Birbonus SDK types are used:
import BirbonusSDKCreate an EcoConfiguration instance with the required environment, language, and host application hash. Then create the authentication manager, details delegate, and EcoConfigurator.
// Create the SDK configuration
let configuration = try EcoConfiguration.build(
environment: .production,
language: .english,
host: "<HOST_APP_HASH>"
)
// Create an authentication manager that conforms to EcoAuthenticationProtocol
let authManager = MyAuthManager()
// Create a details delegate that conforms to EcoDetailsProtocol
let hostDelegate = HostAppManager()
// Initialize the configurator
let configurator = EcoConfigurator(
configuration: configuration,
authManager: authManager,
hostDelegate: hostDelegate
)public enum AppEnvironmentSDK: String, CaseIterable {
case testing
case production
case development
}public enum AppLanguageSDK: String, CaseIterable {
case azerbaijani
case english
case russian
}