Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eure/AppVersionMonitor
Monitor iOS app version easily.
https://github.com/eure/AppVersionMonitor
Last synced: 2 months ago
JSON representation
Monitor iOS app version easily.
- Host: GitHub
- URL: https://github.com/eure/AppVersionMonitor
- Owner: eure
- License: mit
- Created: 2015-12-15T15:51:39.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-02-01T15:02:23.000Z (about 3 years ago)
- Last Synced: 2024-11-12T06:05:56.013Z (3 months ago)
- Language: Swift
- Homepage:
- Size: 49.8 KB
- Stars: 260
- Watchers: 87
- Forks: 20
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - AppVersionMonitor - Monitor iOS app version easily. (Utility / Web View)
- awesome-swift - AppVersionMonitor - Monitor iOS app version easily. (Libs / Version Manager)
- awesome-swift - AppVersionMonitor - Monitor iOS app version easily. (Libs / Version Manager)
- awesome-ios-star - AppVersionMonitor - Monitor iOS app version easily. (Utility / Web View)
- fucking-awesome-swift - AppVersionMonitor - Monitor iOS app version easily. (Libs / Version Manager)
- awesome-swift-cn - AppVersionMonitor - Monitor iOS app version easily. (Libs / Utility)
- awesome-swift - AppVersionMonitor - Monitor iOS app version easily. ` 📝 3 years ago ` (Version Manager [🔝](#readme))
README
# AppVersionMonitor
[![CI Status](http://img.shields.io/travis/muukii/AppVersionMonitor.svg?style=flat)](https://travis-ci.org/muukii/AppVersionMonitor)
[![Version](https://img.shields.io/cocoapods/v/AppVersionMonitor.svg?style=flat)](http://cocoapods.org/pods/AppVersionMonitor)
[![License](https://img.shields.io/cocoapods/l/AppVersionMonitor.svg?style=flat)](http://cocoapods.org/pods/AppVersionMonitor)
[![Platform](https://img.shields.io/cocoapods/p/AppVersionMonitor.svg?style=flat)](http://cocoapods.org/pods/AppVersionMonitor)**Monitor iOS app version easily.**
You can get previous version and installation history.
## Usage
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Requirements
- iOS8.0 +
- [Semantic Versioning](http://semver.org/)## Installation
AppVersionMonitor is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod "AppVersionMonitor"
```## Usage
#### Setup
```swift
// AppDelegate
func applicationDidFinishLaunching(application: UIApplication) {
AppVersionMonitor.sharedMonitor.startup()
}```
#### Get MarketingVersion (CFBundleShortVersionString)
```
let currentVersion: AppVersion = AppVersion.marketingVersion
let versionString: String = AppVersion.marketingVersion.versionString // "1.2.3"
```#### Get installed version
```swift
let installedVersions: [AppVersion] = AppVersionMonitor.sharedMonitor.installedVersions
```#### Compare Version
```swift
AppVersion.marketingVersion > AppVersion("1.2.3")
AppVersion("1.2.3") < AppVersion("3.2.1")
AppVersion("1.2.3") < "3.2.1"
```#### You can check app version status easily.
```swift
switch AppVersionMonitor.sharedMonitor.state {
case .Installed:// Do something when app installed.
// Happy! 🍻
// ex. Start tutorial.case .NotChanged:
// Do something when version not changed.
// Peace 😌
// Nothing to do?case .Upgraded(let previousVersion: AppVersion):
// Do something when version upgraded.
// Yeah! 😝
// ex. Migrate App Data.case .Downgraded(let previousVersion: AppVersion):
// Do something when version downgraded. (Impossible normally)
// What happened? 😵
// ex. Purge App Data.}
```## Author
muukii
## License
AppVersionMonitor is available under the MIT license. See the LICENSE file for more info.