SvenTiigi / WhatsNewKit

Showcase your awesome new app features 📱
https://sventiigi.github.io/WhatsNewKit/
MIT License
3.92k stars 193 forks source link

How do you programmatically show what's new #83

Closed pkasson closed 7 months ago

pkasson commented 7 months ago

I was able to use the JSON to update the what's new for each new app version - works great !

What I wanted was a data driven (from an API call) to pull down what's new payload and use that instead of a static json file.

Having done that, and mapped the data to the WhatsNew model ... it appears a timing issue where the app gets this data from the API and store an .environment, but the what's new pop up never shows.

.environment(\.whatsNew, WhatsNewEnvironment(currentVersion :getCurrentVersion(version :utility.getWhatsNewVersion()), versionStore: (getVersionStore() == 0 ? getInMemoryVersionStore() : getUserDefaultsVersionStore()), whatsNewCollection: getCollection2()))

Due to the API being async, I am trying to have the whatsNewCollection force the popup, but it never appears.

How can you update the kit to process this payload from this async call and show the popup ? THANK YOU !

SvenTiigi commented 7 months ago

Hi @pkasson

Since the issue you described is beyond the scope of the WhatsNewKit, consider posting such questions on platforms like StackOverflow.

pkasson commented 7 months ago

Is there an example that shows how the autoscroll works ? This seems to be with the kit not scrolling.