• Stars
    star
    259
  • Rank 151,881 (Top 4 %)
  • Language
    Swift
  • License
    MIT License
  • Created over 8 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Monitor iOS app version easily.

AppVersionMonitor

CI Status Version License Platform

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

Installation

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

pod "AppVersionMonitor"

Usage

Setup

// 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

let installedVersions: [AppVersion] = AppVersionMonitor.sharedMonitor.installedVersions

Compare Version

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.

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 [email protected]

License

AppVersionMonitor is available under the MIT license. See the LICENSE file for more info.

More Repositories

1

Animo

Bring life to CALayers with SpriteKit-like animation builders
Swift
282
star
2

swift-style-guide

Coding conventions and best practices for Swift projects
281
star
3

citrus

Fantastic animations and custom views for a good design
Java
238
star
4

RealmIncrementalStore

Realm-powered Core Data persistent store
Swift
230
star
5

Storybook-ios

UI Component previewer for UI development faster in iOS (Currently supports only UIKit)
Swift
187
star
6

ScrollEdgeControl

โ™ป๏ธ Replacement of UIRefreshControl, and more functions.
Swift
54
star
7

kamimai

๐Ÿงป ็ด™่ˆž - Kamimai is a migration manager written in Go
Go
46
star
8

traveling

Kotlin
24
star
9

AssetsPicker

๐ŸžThe UI library to pick PHAsset
Swift
14
star
10

RSS-Swift

Swift
11
star
11

FlatStore

[Experimental] FlatStore is a memory-only data storage library written at Eureka
Swift
10
star
12

appsflyer

AppsFlyer API client library for Go.
Go
8
star
13

bobo

Slack Bot Kit for Golang
Go
8
star
14

Tower

๐Ÿ—ผ Watching git branches, the new commits on each branch run scripts.
Swift
8
star
15

SpringFlowLayoutExample

Swift
7
star
16

slslog

CW Logs Insight ใง trace ใงไธ€้€ฃใฎๅ‡ฆ็†ใ‚’่ฟฝใ†ใ“ใจใฎใงใใ‚‹ Logger ใงใ™ใ€‚
Go
5
star
17

pairs-web-card-example

Web Front-end Team, Pairsใฎใ‚คใƒณใ‚ฟใƒผใƒณ้ธ่€ƒใฎๆŠ€่ก“่ชฒ้กŒใฎๅ›ž็ญ”ไพ‹
JavaScript
3
star
18

example-blog-golang

example codes for blog article
Go
2
star
19

cafe-bot

Slack bot for Archimedes Cafe
Go
1
star
20

PushTower

๐Ÿ—ผ Dispatch Remote Push Notification Packages [Core <- Server | DesktopApp]
Objective-C
1
star
21

bobo-googlehome

Google Home Commands and Tasks for eure/bobo (Slackbot)
Go
1
star