Logo

Real-Time Updates

Implement EcoDetailsProtocol to receive barcode and balance updates from Birbonus.

Implementing EcoDetailsProtocol

final class HostAppManager: EcoDetailsProtocol {
    /// Called when a new barcode becomes available.
    func didUpdateBarcode(_ barcode: String) {
        // Update the UI or store the barcode for later use.
    }

    /// Called when the user's Birbonus balance changes.
    func didUpdateBalance(_ balance: Decimal) {
        // Refresh balance-related UI or business logic.
    }
}