Consider this block of code which uses NSComparisonResult, what can I do to make this return false? This should be able to parse strings that have multiple decimal points.
let currentInstalledVersion = "16"
let currentAppStoreVersion = "16.0"
var newVersionExists = false
if (currentInstalledVersion.compare(currentAppStoreVersion, options: .NumericSearch) == NSComparisonResult.OrderedAscending) {
newVersionExists = true
}
newVersionExists
Outputs to true in playgrounds.
Could someone explain why that is the case?