bambuser / BambuserPlayerSDK-iOS

SDK of Bambusers live video shopping player for iOS
7 stars 2 forks source link

Product missing properties (1.4.0) and OpenProduct not firing #9

Closed joshuapoq closed 3 months ago

joshuapoq commented 5 months ago

Description

The latest version of Bambuser adds ProductDetailsDataSource and hydration API which looks to replace the openProduct event but the Product object has no properties so we can't handle presenting the Product screen.

Repository docs are also out of date for how to use this new API but it's easy enough to understand and figure out.

Versions

Code

class BambuserFactory: ProductDetailsDataSource {
    func makeBambuserViewController(showId: String) -> UIViewController {
        BambuserPlayerViewController(showId: showId, config: .init(uiConfig: .init()), productDetailsDataSource: self) { event in
            switch event {
            case .openProduct(let product):
                print(product) // Never called.

            default:
                break
            }
        }
    }

    func productDetails(for product: BambuserPlayerSDK.Product.Request) async throws -> BambuserPlayerSDK.Product.Hydrated? {
        // product has no properties so we don't know which product to hydrate.
        return nil
    }
}
saeidbasirnia commented 5 months ago

Hi,

Thanks for reporting this issue, we're working on this and will make a fix soon.

saeidbasirnia commented 3 months ago

This issue should be resolved in BambuserPlayerSDK 1.5.0

joshuapoq commented 3 months ago

All working as expected, great release. 👍