Skip to content

Simple and Lightweight App Version Tracking for iOS written in Swift

License

Notifications You must be signed in to change notification settings

arashr/AEAppVersion

 
 

Repository files navigation

AEAppVersion

Simple and lightweight iOS App Version Tracking written in Swift

Language Swift 3.0 Platforms iOS License MIT

CocoaPods Version Carthage compatible Swift Package Manager compatible

Dead simple app version tracking. Add one line to your code and you're all set.
I recommend adding this to the project before you really need it (e.g. initial version),
so when you do have a need to change something on particular version update, it's already there.

Index

Features

  • Check app version state via enum property
  • Get app version information via static properties
  • Covered with unit tests
  • Covered with docs

Usage

You should just initialize AEAppVersion from your AppDelegate's didFinishLaunchingWithOptions: like this:

AEAppVersion.launch()

Anytime later you can check version state like this:

switch AEAppVersion.shared.state {
case .new:
  return "Clean Install"
case .equal:
  return "Not Changed"
case .update(let previousVersion):
  return "Update from: \(previousVersion)"
case .rollback(let previousVersion):
  return "Rollback from: \(previousVersion)"
}

Hint: You may use helpers for app version and build number like this:

let version = AEAppVersion.version
let build = AEAppVersion.build

You can also check out the example project and unit tests for more information.

Requirements

  • Xcode 8.0+
  • iOS 8.0+

Installation

License

AEAppVersion is released under the MIT license. See LICENSE for details.

About

Simple and Lightweight App Version Tracking for iOS written in Swift

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 90.1%
  • Objective-C 6.9%
  • Ruby 3.0%