You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have changed the version store to use user defaults and used that in the .environment call ... but the initial what's new that is created in the App class, never reappears.
Also tried to subclass the WhatsNewEnvironment ... but not clear how to pass in a new WhatsNew object, OR, at least then while testing, how to revert back to contents of an existing version to get the content to be correct before publishing.
Thanks !
What are the steps to reproduce?
Outlined above.
What is the expected behavior?
Should have the initial what's new content to reappear
The text was updated successfully, but these errors were encountered:
The default behavior of the WhatsNewEnvironment in combination with a WhatsNewVersionStore is that a version is presented only once to a user.
Additionally, the default WhatsNewEnvironment includes the following fallback mechanism as described in the README:
[...] the WhatsNewEnvironment includes a fallback for patch versions. For example when a user installs version 1.0.1 and you only have declared a WhatsNew for version 1.0.0 the environment will automatically fallback to version 1.0.0 and present the WhatsNewView to the user if needed.
If you like to change this behavior please feel free to subclass the WhatsNewEnvironment or provide your own implementation of the WhatsNewVersionStore.
Alternatively, you can make use of the remove(presentedVersion:) function on an instance of UserDefaultsWhatsNewVersionStore as highlighted by @boehs
What happened?
I have changed the version store to use user defaults and used that in the .environment call ... but the initial what's new that is created in the App class, never reappears.
.environment(\.whatsNew, .init(versionStore: userDefaultsWhatsNewVersionStore, whatsNewCollection: self))
Also tried to subclass the WhatsNewEnvironment ... but not clear how to pass in a new WhatsNew object, OR, at least then while testing, how to revert back to contents of an existing version to get the content to be correct before publishing.
Thanks !
What are the steps to reproduce?
Outlined above.
What is the expected behavior?
Should have the initial what's new content to reappear
The text was updated successfully, but these errors were encountered: