Skip to content

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

Notifications You must be signed in to change notification settings

BluMenlo/VersionComparator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 

Repository files navigation

VersionComparator Class

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.

Example

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"];

Expansion

I would like any potential contributors to help expand this class to include additional functions with the followin

  1. Keep it Light
  2. Keep it User-Friendly

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 100.0%