bambuser / bambuser-livevideoshoppingplayer-sdk-ios

This SDK helps you add a Bambuser live shopping player to your UIKit and SwiftUI apps.
8 stars 2 forks source link

[Issue] - Two events are fired when we show a product during the live stream #16

Closed heldernunesff closed 1 year ago

heldernunesff commented 1 year ago

Hello everyone 👋

The new version (0.8.1) has the ability to return urls to us through the openExternalUrl event. This is nice, but we’ve found a change that we weren’t expecting. The showProductView event is now preceded by the openExternalUrl. Is it possible to not have this behaviour? From your documentation, in this new event, this seems to happen only when a product is tapped, but all the old events that we currently support should still work as before and should not be preceded by this new event. The PlayerEvent events that we currently support are:

In attachment goes the issue where we asked an event for the URL: https://github.com/bambuser/bambuser-livevideoshoppingplayer-sdk-ios/issues/13

Thank you

ken-bam commented 1 year ago

It is documented that the openExternalUrl event is emitted for product urls as well. One could for example check the url if it is a product url or not and base on that take appropriate action.

In the 0.9.0 we have changed the behaviour to make life a bit easier for you, so openExternalUrl is not emitted for product urls originated from the product stream or the product drawer. This is documented in the change log as a breaking change since it changes the behaviour from the 0.8.1 version. So you should get your app working now, without any url parsing.