Latest 1.0.2
Homepage https://github.com/DragonCherry/VersionCompare
License Unlicense
Platforms ios 8.0
Authors

Supports compare version in a very simple & comprehensive way.

Example

XCTAssertTrue(UIDevice.current.systemVersion.isVersion(lessThan: "99.0.0"))
XCTAssertTrue(UIDevice.current.systemVersion.isVersion(equalTo: UIDevice.current.systemVersion))
XCTAssertTrue(UIDevice.current.systemVersion.isVersion(greaterThan: "3.5.99"))
XCTAssertTrue(UIDevice.current.systemVersion.isVersion(lessThanOrEqualTo: "13.5.99"))
XCTAssertTrue(UIDevice.current.systemVersion.isVersion(greaterThanOrEqualTo: UIDevice.current.systemVersion))
XCTAssertTrue("0.1.1".isVersion(greaterThan: "0.1"))
XCTAssertTrue("0.1.0".isVersion(equalTo: "0.1"))
XCTAssertTrue("10.0.0".isVersion(equalTo: "10"))
XCTAssertTrue("10.0.1".isVersion(equalTo: "10.0.1"))
XCTAssertTrue("5.10.10".isVersion(lessThan: "5.11.5"))
XCTAssertTrue("1.0.0".isVersion(greaterThan: "0.99.100"))
XCTAssertTrue("0.5.3".isVersion(lessThanOrEqualTo: "1.0.0"))
XCTAssertTrue("0.5.29".isVersion(greaterThanOrEqualTo: "0.5.3"))

Installation

VersionCompare is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "VersionCompare"

Unlicense

Do whatever you want with this code.

Latest podspec

{
    "name": "VersionCompare",
    "version": "1.0.2",
    "summary": "Supports compare version in a very simple & comprehensive way.",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/DragonCherry/VersionCompare",
    "license": {
        "type": "Unlicense",
        "file": "LICENSE"
    },
    "authors": {
        "DragonCherry": "[email protected]"
    },
    "source": {
        "git": "https://github.com/DragonCherry/VersionCompare.git",
        "tag": "1.0.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "VersionCompare/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This