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
Xcode 15.3
Bambuser 1.4.1
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
}
}
Description
The latest version of Bambuser adds
ProductDetailsDataSource
and hydration API which looks to replace theopenProduct
event but theProduct
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