Closed bkunat closed 8 months ago
Hi @bkunat,
Suggested Solutions: To resolve this issue, consider the following solutions: 1.Call openStory before Initialization: -Ensure that the openStory function is called before the initialization phase of the StorylyView.
Thanks
Environment Details
Storyly SDK Version: 2.10.1 iOS SDK Version: 17.2 Device Model: N/A Device OS Version: N/A Additional Info: N/A
Issue Summary
When initiating the app via a story deep link, calling
StorylyView.openStory(payload:)
before the SDK is fully loaded results in a failure, displaying an error:Storyly cannot be played due to empty data
. Currently, there is no direct method to determine when the Storyly SDK is fully operational, leading to challenges in handling such failures effectively.Detailed Description
The
StorylyDelegate.storylyLoaded(:storyGroupList:dataSource:)
callback is unreliable for this purpose as it can be triggered multiple times. The workaround involves asynchronously retrying theStorylyView.openStory(payload:)
method with a delay, as shown in the following Swift code snippet:Expected Behavior
There should be a mechanism to asynchronously wait for the Storyly SDK to fully load before calling
StorylyView.openStory(payload:)
.Current Behavior
Currently, there is no direct way to ascertain when the Storyly SDK is fully loaded. The fallback method involves setting up retries with a delay, which is not ideal.
Steps to Reproduce
Very Bad Network
(optional but aids in reproducing the issue).Here are sample logs from when I reproduced this issue:
Is there any better way to handle this case? Thanks!