Right now the app uses the Github API value for publishedAt as the sorting value to get the latest version:
func getLatestVersion(branch: Branch) -> Version? {
let fetchRequest = Version.fetchRequest()
fetchRequest.fetchLimit = 1
fetchRequest.sortDescriptors = [NSSortDescriptor(key: "publishedDate", ascending: false)]
var predicates = [NSPredicate]()
[...]
But this can lead to issues. For example, currently, version 0.15.5 has a more recent publishedAt date than 16.0.0.
We need to update the code to handle this in a more robust way. We should base ourselves on the semver version name instead of the published date. This is what we did for the android app in Moustachauve/WLED-Android#168 to fix Moustachauve/WLED-Android#167.
Right now the app uses the Github API value for
publishedAtas the sorting value to get the latest version:But this can lead to issues. For example, currently, version 0.15.5 has a more recent publishedAt date than 16.0.0.
We need to update the code to handle this in a more robust way. We should base ourselves on the semver version name instead of the published date. This is what we did for the android app in Moustachauve/WLED-Android#168 to fix Moustachauve/WLED-Android#167.