Skip to content

An Objective-C Class that allows comparison of version numbers.

Notifications You must be signed in to change notification settings

falkobuttler/VersionComparator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

An app that I developed works by downloading resources from an internet location.
The first step before I put my app through an intensive download process is to check that the resource has updated.
I use version numbers on my resources and store a bunch of local version numbers related to the files previously downloaded.

The main concept is splitting the version numbers and comparing each segment individually.

Obviously, when splitting parts, if the first number in a version is higher, then there's no need to compare further.
If the first number matches, then do the same check on the second number.

BOOL greater = [VersionComparator isVersion:@"2.0.0" greaterThanVersion:@"1.1.0"];

About

An Objective-C Class that allows comparison of version numbers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published