Latest 1.0
Homepage https://github.com/HusamAamer/Versioner
License MIT
Platforms ios 8.0, requires ARC
Authors

Language Swift 3
CI Status
Version
License
Platform

Your app version tracker.

Usages

1 : Events

  • App installed.

    Versioner.currentVersion.isFreshInstall {
    // Welcome user
    }
  • App updated.

    Versioner.currentVersion.isUpdate { (prevVersion) in 
    // Show new features
    }
  • App downgraded
    Versioner.currentVersion.isDowngrade { (prevVersion) in 
    // Disable app or prompt to update
    }
  • App build updated.
    Versioner.currentVersion.isBuildUpdate { (prevVersion) in 
    // Notify tester
    }
  • App build downgraded.
    Versioner.currentVersion.isBuildDowngrade { (prevVersion) in 
    // Clean app data directory or make core data model changes ... etc
    }
  • App launched with number X.
    
    Versioner.currentVersion.isLaunch(number: 3) { (prevVersion) in 
    /* 
    Launch number X of this version (not all versions together),
                        X = any number you want */

}


## #2 : CurrentVersion info
```swift
Versioner.currentVersion.number      // Marketing or iTunesConnect version
Versioner.currentVersion.build       // Build number
Versioner.currentVersion.launchNumber    // Number of app launches during this version
Versioner.currentVersion.firstLaunchDate // Date of first launch
Versioner.currentVersion.os_version  // OS Version when this version first installed

3 : Operators and Version check

Execute another specific code in future release

if Versioner.currentVersion > AppVersion("3.0") {
    // Do new code
        //      ex: call new backend
} else {
        // Do old code
    //      ex: call old backend
}
print(Versioner.currentVersion > AppVersion("3.0.0.1")) // true or false
print(AppVersion("3.0") < AppVersion("3.1")) // true
print(AppVersion("3.0") == AppVersion("3.0")) // true

Installation

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

pod "Versioner"

Then add this line to application didFinishLaunchingWithOptions before calling any api method.

Versioner.initiate()

Author

Husam Aamer , [email protected]

License

Made with ❤️ in 🇮🇶 under the MIT license.

Latest podspec

{
    "name": "Versioner",
    "version": "1.0",
    "summary": "Groundbreaking version tracker .",
    "requires_arc": true,
    "description": "Versioner helps you detect if this is a fresh install, version update or other version state changes through a neat closures.nIt has operators for versions comparison that gives you the ability to write code for future releases depening on app version without the need to delete old code.",
    "homepage": "https://github.com/HusamAamer/Versioner",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "[email protected]": "[email protected]"
    },
    "source": {
        "git": "https://github.com/HusamAamer/Versioner.git",
        "tag": "1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Source/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This