Closed felix-barz-brickmakers closed 3 years ago
Hi, @felix-barz-brickmakers, I see your point but this is out of the scope proposed by this library.
We believe that it's up to the developer to decide when or how to define when the update is needed. Not always you want to update the app as soon a new version is available. Some might want to control this via API or by some business rule that gives their users the best experience with less disruption.
Although I understand that some might want to use the app versions to trigger updates, this is already provided by the platforms natively.
We would happily accept this second helper entrypoint if you/someone can provide a PR for it, but it's not something you should expect us to work on.
It would be awesome if the library could also support a basic update check, using the "standard" APIs, i.e. google play and the iTunes store. To support this, the following would have to be done.
checkForUpdates
method (or similar), something like the following:NativeUpdater.checkForUpdates( BuildContext context, { UpdateLevel Function(int, int) androidCompareVersion, // compare version code aka. build number UpdateLevel Function(String, String) iosCompareVersion, // compare version string // other parameters from displayUpdateAlert, except forceUpdate, which is replaced by the UpdateLevel result });